0049_storage_enforcement_mode.sql9 lines · main
| 1 | -- 0049_storage_enforcement_mode — 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). 'block' |
| 5 | -- = an admin opts THIS project in so new writes (studio insert / create table / |
| 6 | -- object upload) are refused once it is over its effective cap. Off by default; |
| 7 | -- the enforcement code fails OPEN. Lands on the control DB (Postgres). Additive, |
| 8 | -- idempotent ADD COLUMN with a default — DoltGres-safe by construction. |
| 9 | ALTER TABLE "projects" ADD COLUMN IF NOT EXISTS "storage_enforcement_mode" text DEFAULT 'flag' NOT NULL; |