Skip to content

Commit 28270ac

Browse files
authored
fix: added allowNull: true for new cols
1 parent 01faad4 commit 28270ac

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

migrations/2021-05-28-add-fields-to-job-and-job-candidate.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ module.exports = {
1010
const transaction = await queryInterface.sequelize.transaction()
1111
try {
1212
await queryInterface.addColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'min_salary',
13-
{ type: Sequelize.INTEGER, allowNull: false },
13+
{ type: Sequelize.INTEGER, allowNull: true },
1414
{ transaction })
1515
await queryInterface.addColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'max_salary',
16-
{ type: Sequelize.INTEGER, allowNull: false },
16+
{ type: Sequelize.INTEGER, allowNull: true },
1717
{ transaction })
1818
await queryInterface.addColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'hours_per_week',
19-
{ type: Sequelize.INTEGER, allowNull: false },
19+
{ type: Sequelize.INTEGER, allowNull: true },
2020
{ transaction })
2121
await queryInterface.addColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'job_location',
22-
{ type: Sequelize.STRING(255), allowNull: false },
22+
{ type: Sequelize.STRING(255), allowNull: true },
2323
{ transaction })
2424
await queryInterface.addColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'job_timezone',
25-
{ type: Sequelize.STRING(128), allowNull: false },
25+
{ type: Sequelize.STRING(128), allowNull: true },
2626
{ transaction })
2727
await queryInterface.addColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'currency',
28-
{ type: Sequelize.STRING(30), allowNull: false },
28+
{ type: Sequelize.STRING(30), allowNull: true },
2929
{ transaction })
3030
await queryInterface.addColumn({ tableName: 'job_candidates', schema: config.DB_SCHEMA_NAME }, 'remark',
3131
{ type: Sequelize.STRING(255) },

0 commit comments

Comments
 (0)