-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #245 from BaseAdresseNationale/antoineludeau/modif…
…y-job-status-db-schema-with-migration Modify job status db schema with migration file
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
db-migrations/migrations/20230822124246-add-columns-to-job-statuses.cjs
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,20 @@ | ||
'use strict' | ||
|
||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
await queryInterface.addColumn('JobStatuses', 'dataType', { | ||
type: Sequelize.STRING, | ||
allowNull: true, | ||
}) | ||
|
||
await queryInterface.addColumn('JobStatuses', 'jobType', { | ||
type: Sequelize.STRING, | ||
allowNull: true, | ||
}) | ||
}, | ||
|
||
async down(queryInterface) { | ||
await queryInterface.removeColumn('JobStatuses', 'dataType') | ||
await queryInterface.removeColumn('JobStatuses', 'jobType') | ||
}, | ||
} |
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