Fix add_decom_workflow_type migration to include Remediate in constraint
The older migration drops and re-adds the workflow_type CHECK constraint but only included FP, Archer, CARD, GRANITE, DECOM. Once Remediate data exists in the table, re-adding the old constraint fails. Added Remediate to the constraint set so migrations can run idempotently in order.
This commit is contained in:
@@ -17,7 +17,7 @@ async function migrate() {
|
|||||||
await pool.query(`
|
await pool.query(`
|
||||||
ALTER TABLE ivanti_todo_queue
|
ALTER TABLE ivanti_todo_queue
|
||||||
ADD CONSTRAINT ivanti_todo_queue_workflow_type_check
|
ADD CONSTRAINT ivanti_todo_queue_workflow_type_check
|
||||||
CHECK (workflow_type IN ('FP', 'Archer', 'CARD', 'GRANITE', 'DECOM'))
|
CHECK (workflow_type IN ('FP', 'Archer', 'CARD', 'GRANITE', 'DECOM', 'Remediate'))
|
||||||
`);
|
`);
|
||||||
console.log('✓ Added updated workflow_type constraint (includes DECOM)');
|
console.log('✓ Added updated workflow_type constraint (includes DECOM)');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user