Last active
April 18, 2022 15:45
-
-
Save garystafford/1fe0ce030e532a67ef1b1aec64c440f8 to your computer and use it in GitHub Desktop.
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
-- wrap in transaction | |
BEGIN; | |
-- customers.customer | |
ALTER TABLE IF EXISTS customers.customer | |
DROP CONSTRAINT IF EXISTS customer_address_id_fkey; | |
ALTER TABLE IF EXISTS customers.customer | |
ADD CONSTRAINT customer_address_id_fkey FOREIGN KEY (address_id) | |
REFERENCES customers.address (address_id) MATCH SIMPLE | |
ON UPDATE CASCADE | |
ON DELETE RESTRICT; | |
COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment