0035_storage_enforcement.sql8 lines · main
| 1 | -- 0035_storage_enforcement — Sprint 4 Phase 4 (the deferred "block" lever). |
| 2 | -- |
| 3 | -- Per-project storage enforcement mode. Default 'flag' = current behaviour |
| 4 | -- (surface over-limit in the admin dashboard, never block a customer). |
| 5 | -- 'block' = reject new writes (createTable / insertRow) while the project is |
| 6 | -- over its effective cap. Off by default; an admin opts a specific project in. |
| 7 | -- Lands on the control DB (Postgres). Additive ADD COLUMN with default. |
| 8 | ALTER TABLE "projects" ADD COLUMN IF NOT EXISTS "storage_enforcement" text DEFAULT 'flag' NOT NULL; |