سامانه صدور فاکتور و حسابداری
Reconcile prepared enterprise migration with production
davoodmehraban89 committed
Sep 30, 2026 at 01:44 UTC
5c88f1be32511e4657ad84ad942b51fe3051e753
1 file changed
+1
-19
supabase/migrations/20260930222500_iran_enterprise_control_collections.sql
renamed
+1
-19
@@ -1,21 +1 @@
1
-alter table public.records drop constraint if exists records_collection_check;
2
-alter table public.records add constraint records_collection_check check (collection = any (array[
3
-'companies','contacts','products','invoices','cheques','expenses','settings','purchases','payments',
4
-'fiscalYears','accounts','dimensionTypes','dimensionValues','accountDimensionRules','branches','projects','projectLinks',
5
-'postingProfiles','journalVouchers','journalLines','journalLineDimensions',
6
-'contracts','contractAmendments','contractParties','contractDeductions','guarantees','guaranteeEvents','contractStatements','phase4Audit',
7
-'warehouses','stockMovements','inventoryCounts','fixedAssets','assetDepreciations','currencies','exchangeRates','costCenters',
8
-'importBatches','integrationConnections','integrationOutbox','phase5Audit',
9
-'employees','employmentContracts','employeeLeave','cashboxes','pettyCashFunds','complianceRules'
10
-]::text[]));
11
-
12
-create unique index if not exists ux_finora_employee_personnel_no
13
-on public.records(owner_id,(data->>'companyId'),upper(data->>'personnelNo')) where collection='employees';
14
-
15
-create unique index if not exists ux_finora_employee_leave_year
16
-on public.records(owner_id,(data->>'companyId'),(data->>'employeeId'),(data->>'year')) where collection='employeeLeave';
17
-
18
-create unique index if not exists ux_finora_cashbox_code
19
-on public.records(owner_id,(data->>'companyId'),upper(data->>'code')) where collection='cashboxes';
1
+-- Superseded prepared migration. Production already applied the enterprise collection expansion as 20260929221252_iran_enterprise_foundation_collections.sql; this later placeholder is intentionally no-op to prevent duplicate DDL.\n
\ No newline at end of file