fs-lawrisk/docs/sql/004_create_region_permit_th...

10 lines
367 B
MySQL
Raw Permalink Normal View History

CREATE TABLE IF NOT EXISTS region_permit_theme_overrides (
region_id uuid NOT NULL REFERENCES regions(id) ON DELETE CASCADE,
permit_id uuid NOT NULL REFERENCES permits(id) ON DELETE CASCADE,
binds_all_themes boolean NOT NULL DEFAULT false,
created_at timestamptz NOT NULL DEFAULT now(),
created_by text,
PRIMARY KEY (region_id, permit_id)
);