Skip to content

Commit 8cff84e

Browse files
author
Mauricio Siu
committed
feat: add build server and registry configurations to database schema
- 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.
1 parent 742ca00 commit 8cff84e

3 files changed

Lines changed: 6810 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CREATE TYPE "public"."serverType" AS ENUM('deploy', 'build');--> statement-breakpoint
2+
ALTER TABLE "application" ADD COLUMN "buildServerId" text;--> statement-breakpoint
3+
ALTER TABLE "application" ADD COLUMN "buildRegistryId" text;--> statement-breakpoint
4+
ALTER TABLE "deployment" ADD COLUMN "buildServerId" text;--> statement-breakpoint
5+
ALTER TABLE "server" ADD COLUMN "serverType" "serverType" DEFAULT 'deploy' NOT NULL;--> statement-breakpoint
6+
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
7+
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
8+
ALTER TABLE "deployment" ADD CONSTRAINT "deployment_buildServerId_server_serverId_fk" FOREIGN KEY ("buildServerId") REFERENCES "public"."server"("serverId") ON DELETE cascade ON UPDATE no action;

0 commit comments

Comments
 (0)