diff --git a/migrations/hsl/timetables/1692783935710_remove_foreign_key_constraints_on_return_value_timetable_version/down.sql b/migrations/hsl/timetables/1692783935710_remove_foreign_key_constraints_on_return_value_timetable_version/down.sql new file mode 100644 index 00000000..742260c5 --- /dev/null +++ b/migrations/hsl/timetables/1692783935710_remove_foreign_key_constraints_on_return_value_timetable_version/down.sql @@ -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); diff --git a/migrations/hsl/timetables/1692783935710_remove_foreign_key_constraints_on_return_value_timetable_version/up.sql b/migrations/hsl/timetables/1692783935710_remove_foreign_key_constraints_on_return_value_timetable_version/up.sql new file mode 100644 index 00000000..db2e7608 --- /dev/null +++ b/migrations/hsl/timetables/1692783935710_remove_foreign_key_constraints_on_return_value_timetable_version/up.sql @@ -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;