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

0740-fix-old-enums.ts 801 B

123456789101112131415161718192021222324252627282930313233
  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. try {
  9. await utils.sequelize.query('drop type "enum_actorFollow_state"')
  10. await utils.sequelize.query('alter type "enum_AccountFollows_state" rename to "enum_actorFollow_state";')
  11. } catch {
  12. // empty
  13. }
  14. try {
  15. await utils.sequelize.query('drop type "enum_accountVideoRate_type"')
  16. await utils.sequelize.query('alter type "enum_AccountVideoRates_type" rename to "enum_accountVideoRate_type";')
  17. } catch {
  18. // empty
  19. }
  20. }
  21. async function down (utils: {
  22. queryInterface: Sequelize.QueryInterface
  23. transaction: Sequelize.Transaction
  24. }) {
  25. }
  26. export {
  27. up,
  28. down
  29. }