0325-video-abuse-fields.ts 695 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import * as Sequelize from 'sequelize'
  2. async function up (utils: {
  3. transaction: Sequelize.Transaction,
  4. queryInterface: Sequelize.QueryInterface,
  5. sequelize: Sequelize.Sequelize
  6. }): Promise<void> {
  7. {
  8. const data = {
  9. type: Sequelize.STRING(3000),
  10. allowNull: false,
  11. defaultValue: null
  12. }
  13. await utils.queryInterface.changeColumn('videoAbuse', 'reason', data)
  14. }
  15. {
  16. const data = {
  17. type: Sequelize.STRING(3000),
  18. allowNull: true,
  19. defaultValue: null
  20. }
  21. await utils.queryInterface.changeColumn('videoAbuse', 'moderationComment', data)
  22. }
  23. }
  24. function down (options) {
  25. throw new Error('Not implemented.')
  26. }
  27. export {
  28. up,
  29. down
  30. }