mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-02 12:35:24 +02:00
- Created a new SQL file to define the serverType enum and added buildServerId and buildRegistryId columns to the application and deployment tables. - Established foreign key constraints for buildServerId and buildRegistryId to ensure referential integrity with the server and registry tables. - Updated the journal and snapshot files to reflect these schema changes, enhancing the overall build server functionality.
8 lines
1.1 KiB
SQL
8 lines
1.1 KiB
SQL
CREATE TYPE "public"."serverType" AS ENUM('deploy', 'build');--> statement-breakpoint
|
|
ALTER TABLE "application" ADD COLUMN "buildServerId" text;--> statement-breakpoint
|
|
ALTER TABLE "application" ADD COLUMN "buildRegistryId" text;--> statement-breakpoint
|
|
ALTER TABLE "deployment" ADD COLUMN "buildServerId" text;--> statement-breakpoint
|
|
ALTER TABLE "server" ADD COLUMN "serverType" "serverType" DEFAULT 'deploy' NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "application" ADD CONSTRAINT "application_buildServerId_server_serverId_fk" FOREIGN KEY ("buildServerId") REFERENCES "public"."server"("serverId") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
|
ALTER TABLE "application" ADD CONSTRAINT "application_buildRegistryId_registry_registryId_fk" FOREIGN KEY ("buildRegistryId") REFERENCES "public"."registry"("registryId") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
|
ALTER TABLE "deployment" ADD CONSTRAINT "deployment_buildServerId_server_serverId_fk" FOREIGN KEY ("buildServerId") REFERENCES "public"."server"("serverId") ON DELETE cascade ON UPDATE no action; |