ニジカ投稿局 https://tv.nizika.tv
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
944 B

  1. import { LiveVideoLatencyMode } from '@peertube/peertube-models'
  2. import * as Sequelize from 'sequelize'
  3. async function up (utils: {
  4. transaction: Sequelize.Transaction
  5. queryInterface: Sequelize.QueryInterface
  6. sequelize: Sequelize.Sequelize
  7. db: any
  8. }): Promise<void> {
  9. await utils.queryInterface.addColumn('videoLive', 'latencyMode', {
  10. type: Sequelize.INTEGER,
  11. defaultValue: null,
  12. allowNull: true
  13. }, { transaction: utils.transaction })
  14. {
  15. const query = `UPDATE "videoLive" SET "latencyMode" = ${LiveVideoLatencyMode.DEFAULT}`
  16. await utils.sequelize.query(query, { type: Sequelize.QueryTypes.UPDATE, transaction: utils.transaction })
  17. }
  18. await utils.queryInterface.changeColumn('videoLive', 'latencyMode', {
  19. type: Sequelize.INTEGER,
  20. defaultValue: null,
  21. allowNull: false
  22. }, { transaction: utils.transaction })
  23. }
  24. function down () {
  25. throw new Error('Not implemented.')
  26. }
  27. export {
  28. up,
  29. down
  30. }