2
1

0195-support.ts 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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(500),
  10. allowNull: true,
  11. defaultValue: null
  12. }
  13. await utils.queryInterface.addColumn('video', 'support', data)
  14. }
  15. {
  16. const data = {
  17. type: Sequelize.STRING(500),
  18. allowNull: true,
  19. defaultValue: null
  20. }
  21. await utils.queryInterface.addColumn('videoChannel', 'support', data)
  22. }
  23. {
  24. const data = {
  25. type: Sequelize.STRING(250),
  26. allowNull: true,
  27. defaultValue: null
  28. }
  29. await utils.queryInterface.addColumn('account', 'description', data)
  30. }
  31. {
  32. const data = {
  33. type: Sequelize.STRING(10000),
  34. allowNull: true,
  35. defaultValue: null
  36. }
  37. await utils.queryInterface.changeColumn('video', 'description', data)
  38. }
  39. }
  40. function down (options) {
  41. throw new Error('Not implemented.')
  42. }
  43. export {
  44. up,
  45. down
  46. }