Update: 2026-05-05 01:31:02

This commit is contained in:
Hamza-Ayed
2026-05-05 01:31:02 +03:00
parent 2f6a08800d
commit dcbf8bd04f
2 changed files with 22 additions and 19 deletions

View File

@@ -23,6 +23,9 @@ $migrations = [
// 2. Add validation_warnings for AI Pre-Audit
'add_validation_warnings' => "ALTER TABLE invoices ADD COLUMN validation_warnings JSON NULL",
// 2.5 Add deleted_at for soft delete (Missing in Phase 1 for this table)
'add_invoices_soft_delete' => "ALTER TABLE invoices ADD COLUMN deleted_at DATETIME NULL DEFAULT NULL",
// 3. Create Unique Index to prevent duplicates within the same tenant & company
// Using a regular index for now, application logic will handle uniqueness to allow nulls
'add_hash_index' => "CREATE INDEX idx_invoice_hash ON invoices(tenant_id, company_id, invoice_hash)",