diff --git a/scripts/migrate_phase3_mobile.php b/scripts/migrate_phase3_mobile.php index afc1b6c..fb9e086 100644 --- a/scripts/migrate_phase3_mobile.php +++ b/scripts/migrate_phase3_mobile.php @@ -42,7 +42,7 @@ $migrations = [ FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE, UNIQUE KEY uq_user_device (user_id, device_fingerprint), INDEX idx_device_fingerprint (device_fingerprint) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 + ) ", // ─── 2. Users table: Add phone + mobile fields ───────── @@ -74,7 +74,7 @@ $migrations = [ FOREIGN KEY (tenant_id) REFERENCES tenants(id) ON DELETE CASCADE, FOREIGN KEY (company_id) REFERENCES companies(id) ON DELETE CASCADE, FOREIGN KEY (uploaded_by) REFERENCES users(id) ON DELETE SET NULL - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 + ) ", // ─── 4. Invoice Processing Queue ─────────────────────── @@ -96,7 +96,7 @@ $migrations = [ INDEX idx_status_tenant (status, tenant_id), INDEX idx_batch (batch_id), INDEX idx_pending (status, attempts) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 + ) ", // ─── 5. Add batch_id to invoices table ───────────────── @@ -122,7 +122,7 @@ $migrations = [ INDEX idx_type (type), FOREIGN KEY (tenant_id) REFERENCES tenants(id) ON DELETE CASCADE, FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 + ) ", ];