Last active
August 12, 2019 23:22
-
-
Save apolishch/5f4409e4e146c841229687b9509802bd to your computer and use it in GitHub Desktop.
policy_migration2.js
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
export const up = (db, callback) => db.runSql(` | |
ALTER TABLE flock_payments.payments | |
DROP CONSTRAINT payments_fkey; | |
ALTER TABLE flock_policies.policies | |
ALTER COLUMN id TYPE INT; | |
ALTER TABLE flock_payments.payments | |
ALTER COLUMN policy_id TYPE INT; | |
ALTER TABLE flock_payments.payments | |
ADD CONSTRAINT (payments_fkey) | |
FOREIGN KEY policy_id | |
REFERENCES flock_policies.policies (id); | |
`, callback) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment