feat(hub): retire WDMI projects from error reporting (BIT-24704)
Block ingest for retired WDMI slugs, purge project data via migration, remove WDMI runbooks, and add offboard-project helper for future retirements. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
ea41eb2205
commit
8773f12b25
24 files changed
+196
-1858
No files matched your search
@@ -0,0 +1,5 @@
|
||||
-- Irreversible: WDMI project rows and incident history were purged in the up migration (BIT-24704).
|
||||
-- Re-onboarding WDMI slugs is intentionally blocked in ingest-api (`retiredProjects.ts`).
|
||||
|
||||
BEGIN;
|
||||
COMMIT;
|
||||
@@ -0,0 +1,29 @@
|
||||
BEGIN;
|
||||
|
||||
-- Retire WDMI-family projects from the hub (BIT-24704).
|
||||
-- Slug families: wdmi, wdmi-*, *-wdmi, crm-wdmi*.
|
||||
|
||||
UPDATE er_ingest_keys k
|
||||
INNER JOIN er_projects p ON p.id = k.project_id
|
||||
SET k.status = 'revoked',
|
||||
k.revoked_at = NOW(6)
|
||||
WHERE LOWER(p.slug) = 'wdmi'
|
||||
OR LOWER(p.slug) LIKE 'wdmi-%'
|
||||
OR LOWER(p.slug) LIKE '%-wdmi'
|
||||
OR LOWER(p.slug) LIKE 'crm-wdmi%';
|
||||
|
||||
UPDATE er_collector_sources cs
|
||||
INNER JOIN er_projects p ON p.id = cs.project_id
|
||||
SET cs.is_active = FALSE
|
||||
WHERE LOWER(p.slug) = 'wdmi'
|
||||
OR LOWER(p.slug) LIKE 'wdmi-%'
|
||||
OR LOWER(p.slug) LIKE '%-wdmi'
|
||||
OR LOWER(p.slug) LIKE 'crm-wdmi%';
|
||||
|
||||
DELETE FROM er_projects
|
||||
WHERE LOWER(slug) = 'wdmi'
|
||||
OR LOWER(slug) LIKE 'wdmi-%'
|
||||
OR LOWER(slug) LIKE '%-wdmi'
|
||||
OR LOWER(slug) LIKE 'crm-wdmi%';
|
||||
|
||||
COMMIT;
|
||||
Reference in new issue
Block a user