Files
sankofa-hw-infra/packages/schema/drizzle/0003_compliance_profiles.sql
defiQUG 93df3c8c20
Some checks failed
CI / lint-and-test (push) Has been cancelled
Initial commit: add .gitignore and README
2026-02-09 21:51:50 -08:00

15 lines
605 B
SQL

CREATE TABLE IF NOT EXISTS "compliance_profiles" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"org_id" text NOT NULL,
"name" text NOT NULL,
"firmware_freeze_policy" jsonb,
"allowed_generations" jsonb,
"approved_skus" jsonb,
"site_id" uuid,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL
);
CREATE INDEX IF NOT EXISTS "compliance_profiles_org_idx" ON "compliance_profiles" ("org_id");
ALTER TABLE "compliance_profiles" ADD CONSTRAINT "compliance_profiles_site_id_fk" FOREIGN KEY ("site_id") REFERENCES "public"."sites"("id");