diff --git a/scripts/git-incremental-deploy.ps1 b/scripts/git-incremental-deploy.ps1 index 888dcef..61203eb 100644 --- a/scripts/git-incremental-deploy.ps1 +++ b/scripts/git-incremental-deploy.ps1 @@ -1504,6 +1504,7 @@ const expectedMigrationNames = new Set([ '20260820_add_ding_workflow_snapshots', '20260824_expand_ding_workflow_insights', '20260826_add_ding_workflow_demand_type', + '20260827_add_ding_workflow_detail_fields', ]); if (migrations.length !== expectedMigrationNames.size || migrations.some((item) => !expectedMigrationNames.has(item && item.name) diff --git a/scripts/git-incremental-deploy.test.mjs b/scripts/git-incremental-deploy.test.mjs index fab6188..ee113a4 100644 --- a/scripts/git-incremental-deploy.test.mjs +++ b/scripts/git-incremental-deploy.test.mjs @@ -52,3 +52,13 @@ test('deployment SSH hops keep long builds and cutovers alive', () => { assert.match(source, /TCPKeepAlive=yes/) } }) + +test('migration deployment gate recognizes the latest approved schema migration', () => { + const source = readFileSync(new URL('./git-incremental-deploy.ps1', import.meta.url), 'utf8') + const gateStart = source.indexOf('const expectedMigrationNames = new Set([') + const gateEnd = source.indexOf(']);', gateStart) + + assert.ok(gateStart >= 0 && gateEnd > gateStart, 'migration gate list is missing') + const gate = source.slice(gateStart, gateEnd) + assert.match(gate, /20260827_add_ding_workflow_detail_fields/) +})