-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
delete is_manual and is_positive from annotations re #444
- Loading branch information
1 parent
89fcd14
commit bfed22b
Showing
9 changed files
with
49 additions
and
104 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
core/_cli/migrations/20231025000001-delete-annotation-is-manual.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,24 @@ | ||
'use strict' | ||
module.exports = { | ||
up: (queryInterface, Sequelize) => { | ||
return queryInterface.sequelize.transaction(async transaction => { | ||
await queryInterface.sequelize.query('DELETE FROM annotations WHERE is_manual IS TRUE;', { transaction }) | ||
await queryInterface.removeColumn('annotations', 'is_manual', { transaction }) | ||
await queryInterface.removeColumn('annotations', 'is_positive', { transaction }) | ||
}) | ||
}, | ||
down: (queryInterface, Sequelize) => { | ||
return queryInterface.sequelize.transaction(async transaction => { | ||
await queryInterface.addColumn('annotations', 'is_manual', { | ||
type: Sequelize.BOOLEAN, | ||
allowNull: false, | ||
defaultValue: true | ||
}, { transaction }) | ||
await queryInterface.addColumn('annotations', 'is_positive', { | ||
type: Sequelize.BOOLEAN, | ||
allowNull: false, | ||
defaultValue: true | ||
}, { transaction }) | ||
}) | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.