0014_project_suspension.sql 716 B

123456789101112131415
  1. -- Project suspension state — populated by admin action (manual) or by
  2. -- the abuse-report pipeline when a resolution lands as "suspended" or
  3. -- "banned". A non-null suspended_at means: state-changing routes for
  4. -- this project return 403 project_suspended; reads remain open so the
  5. -- operator can investigate via the dashboard. See
  6. -- apps/api/src/services/abuse.ts and middleware/project-suspended.ts
  7. -- for the enforcement points.
  8. ALTER TABLE "projects"
  9. ADD COLUMN IF NOT EXISTS "suspended_at" timestamp with time zone,
  10. ADD COLUMN IF NOT EXISTS "suspend_reason" text;
  11. CREATE INDEX IF NOT EXISTS "projects_suspended_at_idx"
  12. ON "projects" USING btree ("suspended_at")
  13. WHERE "suspended_at" IS NOT NULL;