-
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.
fix(events): add submitted status and its workflow. Fixes MEMB-638
- Loading branch information
1 parent
fa142b5
commit 1200969
Showing
5 changed files
with
416 additions
and
97 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
29 changes: 29 additions & 0 deletions
29
migrations/20191226235828-add-submitted-to-event-statuses.js
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,29 @@ | ||
module.exports = { | ||
up: async (queryInterface, Sequelize) => { | ||
// https://stackoverflow.com/questions/45437924/drop-and-create-enum-with-sequelize-correctly | ||
await queryInterface.changeColumn( | ||
'events', | ||
'status', | ||
{ type: Sequelize.TEXT } | ||
); | ||
await queryInterface.sequelize.query('drop type enum_events_status;'); | ||
await queryInterface.changeColumn( | ||
'events', | ||
'status', | ||
{ type: Sequelize.ENUM('draft', 'submitted', 'published'), allowNull: false } | ||
); | ||
}, | ||
down: async (queryInterface, Sequelize) => { | ||
await queryInterface.changeColumn( | ||
'events', | ||
'status', | ||
{ type: Sequelize.TEXT } | ||
); | ||
await queryInterface.sequelize.query('drop type enum_events_status;'); | ||
await queryInterface.changeColumn( | ||
'events', | ||
'status', | ||
{ type: Sequelize.ENUM('draft', 'requesting', 'published'), 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
Oops, something went wrong.