-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00d2a8c
commit 649ca96
Showing
6 changed files
with
104 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
module.exports = { | ||
up: async (queryInterface, Sequelize) => { | ||
await queryInterface.changeColumn( | ||
'events', | ||
'type', | ||
{ type: Sequelize.TEXT } | ||
); | ||
await queryInterface.sequelize.query('drop type enum_events_type;'); | ||
await queryInterface.sequelize.query('update events set type = \'training\' where type in (\'es\', \'ltc\', \'rtc\' );'); | ||
await queryInterface.sequelize.query('update events set type = \'conference\' where type in (\'european\' );'); | ||
await queryInterface.sequelize.query('update events set type = \'cultural\' where type in (\'wu\');'); | ||
await queryInterface.changeColumn( | ||
'events', | ||
'type', | ||
{ type: Sequelize.ENUM('training', 'nwm', 'conference', 'cultural'), allowNull: false } | ||
); | ||
}, | ||
down: async (queryInterface, Sequelize) => { | ||
await queryInterface.changeColumn( | ||
'events', | ||
'type', | ||
{ type: Sequelize.TEXT } | ||
); | ||
await queryInterface.sequelize.query('drop type enum_events_type;'); | ||
await queryInterface.sequelize.query('update events set type = \'european\' where type in (\'training\', \'cultural\', \'conference\' ;'); | ||
await queryInterface.changeColumn( | ||
'events', | ||
'type', | ||
{ type: Sequelize.ENUM('wu', 'es', 'nwm', 'ltc', 'rtc', 'european'), allowNull: false } | ||
); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters