0120-video-null.ts 871 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. {
  9. const data = {
  10. type: Sequelize.INTEGER,
  11. allowNull: true,
  12. defaultValue: null
  13. }
  14. await utils.queryInterface.changeColumn('Videos', 'licence', data)
  15. }
  16. {
  17. const data = {
  18. type: Sequelize.INTEGER,
  19. allowNull: true,
  20. defaultValue: null
  21. }
  22. await utils.queryInterface.changeColumn('Videos', 'category', data)
  23. }
  24. {
  25. const data = {
  26. type: Sequelize.STRING(10000),
  27. allowNull: true,
  28. defaultValue: null
  29. }
  30. await utils.queryInterface.changeColumn('Videos', 'description', data)
  31. }
  32. }
  33. function down (options) {
  34. throw new Error('Not implemented.')
  35. }
  36. export {
  37. up,
  38. down
  39. }