diff --git a/scripts/safe-production-migrate.mjs b/scripts/safe-production-migrate.mjs index df8081ca..bca67471 100644 --- a/scripts/safe-production-migrate.mjs +++ b/scripts/safe-production-migrate.mjs @@ -343,6 +343,7 @@ async function queryEvidence(prisma, localMigrations) { 'materials_transcode_lease_idx', 'materials_uploadId_key', 'materials_is_incomplete_shell_idx', + 'brand_knowledge_product_category_name_idx', 'product_package_upload_jobs_lease_idx', 'ding_workflow_snapshots_ongoing_updated_idx', 'ding_workflow_snapshots_brand_idx', diff --git a/scripts/safe-production-migrate.test.mjs b/scripts/safe-production-migrate.test.mjs index fbfe751a..4d072af3 100644 --- a/scripts/safe-production-migrate.test.mjs +++ b/scripts/safe-production-migrate.test.mjs @@ -737,6 +737,14 @@ test('container supply chain and migrator image are immutable while SOP keeps co assert.ok(sop.includes('`20260908_add_brand_knowledge`')) assert.match(deploymentSource, /'20260909_expand_brand_knowledge_upload'/) assert.ok(sop.includes('`20260909_expand_brand_knowledge_upload`')) + const indexesQueryStart = migratorSource.indexOf('const indexes = await prisma.$queryRawUnsafe(') + const indexesQueryEnd = migratorSource.indexOf('const constraints = await prisma.$queryRawUnsafe(', indexesQueryStart) + assert.ok(indexesQueryStart >= 0) + assert.ok(indexesQueryEnd > indexesQueryStart) + assert.match( + migratorSource.slice(indexesQueryStart, indexesQueryEnd), + /'brand_knowledge_product_category_name_idx'/, + ) assert.match(sop, /materials_private_optimization_check/) assert.match(sop, /task_detail_private/) assert.match(sop, /can_access_private/)