Update: 2026-05-05 01:31:02
This commit is contained in:
@@ -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)",
|
||||
|
||||
Reference in New Issue
Block a user