fix: include brand knowledge upload index in audit

This commit is contained in:
江林铖 2026-09-09 18:17:42 +08:00
parent f4c2fbf023
commit 754c5e05ed
2 changed files with 9 additions and 0 deletions

View File

@ -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',

View File

@ -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/)