Update: 2026-05-06 01:40:53
This commit is contained in:
@@ -42,7 +42,7 @@ $migrations = [
|
|||||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
||||||
UNIQUE KEY uq_user_device (user_id, device_fingerprint),
|
UNIQUE KEY uq_user_device (user_id, device_fingerprint),
|
||||||
INDEX idx_device_fingerprint (device_fingerprint)
|
INDEX idx_device_fingerprint (device_fingerprint)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
|
)
|
||||||
",
|
",
|
||||||
|
|
||||||
// ─── 2. Users table: Add phone + mobile fields ─────────
|
// ─── 2. Users table: Add phone + mobile fields ─────────
|
||||||
@@ -74,7 +74,7 @@ $migrations = [
|
|||||||
FOREIGN KEY (tenant_id) REFERENCES tenants(id) ON DELETE CASCADE,
|
FOREIGN KEY (tenant_id) REFERENCES tenants(id) ON DELETE CASCADE,
|
||||||
FOREIGN KEY (company_id) REFERENCES companies(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
|
FOREIGN KEY (uploaded_by) REFERENCES users(id) ON DELETE SET NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
|
)
|
||||||
",
|
",
|
||||||
|
|
||||||
// ─── 4. Invoice Processing Queue ───────────────────────
|
// ─── 4. Invoice Processing Queue ───────────────────────
|
||||||
@@ -96,7 +96,7 @@ $migrations = [
|
|||||||
INDEX idx_status_tenant (status, tenant_id),
|
INDEX idx_status_tenant (status, tenant_id),
|
||||||
INDEX idx_batch (batch_id),
|
INDEX idx_batch (batch_id),
|
||||||
INDEX idx_pending (status, attempts)
|
INDEX idx_pending (status, attempts)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
|
)
|
||||||
",
|
",
|
||||||
|
|
||||||
// ─── 5. Add batch_id to invoices table ─────────────────
|
// ─── 5. Add batch_id to invoices table ─────────────────
|
||||||
@@ -122,7 +122,7 @@ $migrations = [
|
|||||||
INDEX idx_type (type),
|
INDEX idx_type (type),
|
||||||
FOREIGN KEY (tenant_id) REFERENCES tenants(id) ON DELETE CASCADE,
|
FOREIGN KEY (tenant_id) REFERENCES tenants(id) ON DELETE CASCADE,
|
||||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
|
)
|
||||||
",
|
",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user