mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-10 16:35:26 +02:00
- Created a new table `sso_provider` with relevant fields and constraints. - Added new columns to the `user` table: `enableEnterpriseFeatures`, `licenseKey`, `isValidEnterpriseLicense`, and `trustedOrigins`. - Established foreign key relationships for `user_id` and `organization_id` in the `sso_provider` table.
18 lines
1.1 KiB
SQL
18 lines
1.1 KiB
SQL
CREATE TABLE "sso_provider" (
|
|
"id" text PRIMARY KEY NOT NULL,
|
|
"issuer" text NOT NULL,
|
|
"oidc_config" text,
|
|
"saml_config" text,
|
|
"provider_id" text NOT NULL,
|
|
"user_id" text,
|
|
"organization_id" text,
|
|
"domain" text NOT NULL,
|
|
CONSTRAINT "sso_provider_provider_id_unique" UNIQUE("provider_id")
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "user" ADD COLUMN "enableEnterpriseFeatures" boolean DEFAULT false NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "user" ADD COLUMN "licenseKey" text;--> statement-breakpoint
|
|
ALTER TABLE "user" ADD COLUMN "isValidEnterpriseLicense" boolean DEFAULT false NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "user" ADD COLUMN "trustedOrigins" text[];--> statement-breakpoint
|
|
ALTER TABLE "sso_provider" ADD CONSTRAINT "sso_provider_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
ALTER TABLE "sso_provider" ADD CONSTRAINT "sso_provider_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action; |