سامانه صدور فاکتور و حسابداری
Validate complete Office C7 migration chain
davoodmehraban89 committed
Oct 1, 2026 at 00:27 UTC
c307422eae508b57e448a3c9b4b3e3506836f3e2
1 file changed
+1
-1
scripts/office-slice-c7-check.mjs
+1
-1
@@ -1,7 +1,7 @@
1
import fs from 'node:fs';import path from 'node:path';
2
const need=(t,r,l)=>{if(!r.test(t))throw new Error('Office C7 invariant missing: '+l)};
3
const dir=path.join(process.cwd(),'supabase','migrations');
4
-const files=fs.readdirSync(dir).filter(x=>/office_slice_c7_.*\.sql$/.test(x));
4
+const files=fs.readdirSync(dir).filter(x=>x.includes('office_slice_c7_')||x.includes('office_c7_'));
5
if(!files.length)throw new Error('Office C7 invariant missing: searchable archive migration');
6
const m=files.map(x=>fs.readFileSync(path.join(dir,x),'utf8')).join('\n');
7
need(m,/office_record_ocr_evidence/i,'OCR evidence RPC');