Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- This lays the groundwork to allow simple renaming of base_field short_code.
-- It is anticipated that a separate table would be created to support
-- redirects at the API level because a simple rename without a redirect
-- breaks previously working URLs.
ALTER TABLE application_form_fields DROP CONSTRAINT base_field_short_code_fkey;
ALTER TABLE application_form_fields
ADD CONSTRAINT base_field_short_code_fkey FOREIGN KEY (base_field_short_code)
REFERENCES base_fields (short_code) ON UPDATE CASCADE;
ALTER TABLE base_field_localizations
DROP CONSTRAINT base_field_short_code_fkey;
ALTER TABLE base_field_localizations
ADD CONSTRAINT base_field_short_code_fkey FOREIGN KEY (base_field_short_code)
REFERENCES base_fields (short_code) ON UPDATE CASCADE;