Add scheduleId to deployment schema and establish foreign key relationship

- Introduced a new column `scheduleId` in the `deployment` table to link deployments with schedules.
- Added a foreign key constraint on `scheduleId` referencing the `schedule` table, ensuring referential integrity.
- Updated the `deployment` schema to include the new relationship with the `schedules` table.
- Enhanced the `schedules` schema to establish a one-to-many relationship with deployments.
This commit is contained in:
Mauricio Siu
2025-05-02 03:27:35 -06:00
parent 0ea264ea42
commit e84ce38994
5 changed files with 5510 additions and 3 deletions

View File

@@ -0,0 +1,2 @@
ALTER TABLE "deployment" ADD COLUMN "scheduleId" text;--> statement-breakpoint
ALTER TABLE "deployment" ADD CONSTRAINT "deployment_scheduleId_schedule_scheduleId_fk" FOREIGN KEY ("scheduleId") REFERENCES "public"."schedule"("scheduleId") ON DELETE cascade ON UPDATE no action;

File diff suppressed because it is too large Load Diff

View File

@@ -624,6 +624,13 @@
"when": 1746177535905,
"tag": "0088_worthless_surge",
"breakpoints": true
},
{
"idx": 89,
"version": "7",
"when": 1746178027816,
"tag": "0089_fearless_morlun",
"breakpoints": true
}
]
}