Skip to content

Commit

Permalink
fix(2767): Stage must always have valid setup and teardown job IDs (#548
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sagar1312 authored Jan 31, 2024
1 parent 88a0bd9 commit 3300621
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions migrations/20240122194105-stage_setup_teardown_required.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* eslint-disable new-cap */

'use strict';

const prefix = process.env.DATASTORE_SEQUELIZE_PREFIX || '';
const table = `${prefix}stages`;

/** @type {import('sequelize-cli').Migration} */
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.sequelize.transaction(async transaction => {
await queryInterface.changeColumn(
table,
'setup',
{
type: Sequelize.INTEGER,
allowNull: false
},
{ transaction }
);
await queryInterface.changeColumn(
table,
'teardown',
{
type: Sequelize.INTEGER,
allowNull: false
},
{ transaction }
);
});
}
};

0 comments on commit 3300621

Please sign in to comment.