-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove fk constraints from return_value.timetable_version
These return_value schema tables are only for function return values, and they should not be part of the data model via any constraints.
- Loading branch information
1 parent
a24e226
commit c4db0f7
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
...s/1692783935710_remove_foreign_key_constraints_on_return_value_timetable_version/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ALTER TABLE return_value.timetable_version | ||
ADD CONSTRAINT timetable_version_vehicle_schedule_frame_id_fkey | ||
FOREIGN KEY (vehicle_schedule_frame_id) REFERENCES vehicle_schedule.vehicle_schedule_frame(vehicle_schedule_frame_id); | ||
|
||
ALTER TABLE return_value.timetable_version | ||
ADD CONSTRAINT timetable_version_substitute_operating_day_by_line_type_id_fkey | ||
FOREIGN KEY (substitute_operating_day_by_line_type_id) REFERENCES service_calendar.substitute_operating_day_by_line_type(substitute_operating_day_by_line_type_id); | ||
|
||
ALTER TABLE return_value.timetable_version | ||
ADD CONSTRAINT timetable_version_day_type_id_fkey | ||
FOREIGN KEY (day_type_id) REFERENCES service_calendar.day_type(day_type_id); |
8 changes: 8 additions & 0 deletions
8
...les/1692783935710_remove_foreign_key_constraints_on_return_value_timetable_version/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ALTER TABLE return_value.timetable_version | ||
DROP CONSTRAINT timetable_version_day_type_id_fkey; | ||
|
||
ALTER TABLE return_value.timetable_version | ||
DROP CONSTRAINT timetable_version_substitute_operating_day_by_line_type_id_fkey; | ||
|
||
ALTER TABLE return_value.timetable_version | ||
DROP CONSTRAINT timetable_version_vehicle_schedule_frame_id_fkey; |