ニジカ投稿局 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.
 
 
 
 
 

43 lines
963 B

  1. import * as Sequelize from 'sequelize'
  2. async function up (utils: {
  3. transaction: Sequelize.Transaction
  4. queryInterface: Sequelize.QueryInterface
  5. sequelize: Sequelize.Sequelize
  6. db: any
  7. }): Promise<void> {
  8. const { transaction } = utils
  9. {
  10. const data = {
  11. type: Sequelize.INTEGER,
  12. defaultValue: null,
  13. allowNull: true
  14. }
  15. await utils.queryInterface.addColumn('userNotificationSetting', 'myVideoStudioEditionFinished', data, { transaction })
  16. }
  17. {
  18. const query = 'UPDATE "userNotificationSetting" SET "myVideoStudioEditionFinished" = 1'
  19. await utils.sequelize.query(query, { transaction })
  20. }
  21. {
  22. const data = {
  23. type: Sequelize.INTEGER,
  24. defaultValue: null,
  25. allowNull: false
  26. }
  27. await utils.queryInterface.changeColumn('userNotificationSetting', 'myVideoStudioEditionFinished', data, { transaction })
  28. }
  29. }
  30. function down () {
  31. throw new Error('Not implemented.')
  32. }
  33. export {
  34. up,
  35. down
  36. }