Skip to content

Commit

Permalink
Merge pull request #245 from BaseAdresseNationale/antoineludeau/modif…
Browse files Browse the repository at this point in the history
…y-job-status-db-schema-with-migration

Modify job status db schema with migration file
  • Loading branch information
mmortier authored Aug 25, 2023
2 parents 6faf06a + fd54422 commit 501b11b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
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')
},
}
8 changes: 8 additions & 0 deletions lib/util/sequelize.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ export const JobStatus = sequelize.define('JobStatus', {
type: DataTypes.STRING,
allowNull: true,
},
dataType: {
type: DataTypes.STRING,
allowNull: true,
},
jobType: {
type: DataTypes.STRING,
allowNull: true,
},
count: {
type: DataTypes.INTEGER,
allowNull: true,
Expand Down

0 comments on commit 501b11b

Please sign in to comment.