feat(classes): migration 037 classes.required_form_id (optional form gate)
Nullable FK classes.required_form_id -> forms(id) ON DELETE SET NULL. Mirrored in schema.sql, types, DATABASE_SCHEMA, DB_SCHEMA_MAP. Additive nullable column on the already-policied classes table (no RLS change); the signup gate is enforced in the app, mirroring the equipment cert-gate.
This commit is contained in:
@@ -2115,6 +2115,7 @@ CREATE TABLE IF NOT EXISTS public.classes (
|
||||
capacity integer CHECK (capacity IS NULL OR capacity > 0),
|
||||
is_active boolean NOT NULL DEFAULT true,
|
||||
grants_certification_id uuid REFERENCES public.certifications(id) ON DELETE SET NULL,
|
||||
required_form_id uuid REFERENCES public.forms(id) ON DELETE SET NULL,
|
||||
created_by uuid REFERENCES public.space_members(id) ON DELETE SET NULL,
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
updated_at timestamptz NOT NULL DEFAULT now()
|
||||
|
||||
Reference in New Issue
Block a user