0215-video-support-length.ts 921 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import * as Sequelize from 'sequelize'
  2. import { CONSTRAINTS_FIELDS } from '../index'
  3. async function up (utils: {
  4. transaction: Sequelize.Transaction,
  5. queryInterface: Sequelize.QueryInterface,
  6. sequelize: Sequelize.Sequelize
  7. }): Promise<void> {
  8. {
  9. const data = {
  10. type: Sequelize.STRING(500),
  11. allowNull: true,
  12. defaultValue: null
  13. }
  14. await utils.queryInterface.changeColumn('video', 'support', data)
  15. }
  16. {
  17. const data = {
  18. type: Sequelize.STRING(500),
  19. allowNull: true,
  20. defaultValue: null
  21. }
  22. await utils.queryInterface.changeColumn('videoChannel', 'support', data)
  23. }
  24. {
  25. const data = {
  26. type: Sequelize.STRING(500),
  27. allowNull: true,
  28. defaultValue: null
  29. }
  30. await utils.queryInterface.changeColumn('videoChannel', 'description', data)
  31. }
  32. }
  33. function down (options) {
  34. throw new Error('Not implemented.')
  35. }
  36. export {
  37. up,
  38. down
  39. }