mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-18 21:55:24 +02:00
- Refactor AI-related schemas and services to use organizationId instead of adminId - Update AI router to check organization-level permissions - Modify AI settings creation and retrieval to work with organization context - Adjust server-side props and access checks for AI settings
12 lines
465 B
SQL
12 lines
465 B
SQL
CREATE TABLE "ai" (
|
|
"aiId" text PRIMARY KEY NOT NULL,
|
|
"name" text NOT NULL,
|
|
"apiUrl" text NOT NULL,
|
|
"apiKey" text NOT NULL,
|
|
"model" text NOT NULL,
|
|
"isEnabled" boolean DEFAULT true NOT NULL,
|
|
"organizationId" text NOT NULL,
|
|
"createdAt" text NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "ai" ADD CONSTRAINT "ai_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action; |