tenantpilot/lib/db/migrations/0001_reflective_dormammu.sql
Ahmed Darrazi 8b36902767
All checks were successful
Trigger Cloudarix Deploy / call-webhook (push) Successful in 1s
Fix: Add unique constraint for policy_settings upsert
2025-12-06 23:33:43 +01:00

3 lines
267 B
SQL

DROP INDEX "policy_settings_upsert_idx";--> statement-breakpoint
ALTER TABLE "user" ADD COLUMN "tenant_id" text;--> statement-breakpoint
ALTER TABLE "policy_settings" ADD CONSTRAINT "policy_settings_upsert_unique" UNIQUE("tenant_id","graph_policy_id","setting_name");