mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-27 11:02:16 +01:00
Remove opt-outs for deleted users. This is useful in tests, where we delete users permanently.
17 lines
401 B
JavaScript
17 lines
401 B
JavaScript
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
ALTER TABLE user_unsubscription DROP CONSTRAINT user_unsubscription_user_id_fkey;
|
|
ALTER TABLE user_unsubscription
|
|
ADD CONSTRAINT user_unsubscription_user_id_fkey
|
|
FOREIGN KEY (user_id)
|
|
REFERENCES users(id) ON DELETE CASCADE;
|
|
`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
db.runSql('', cb);
|
|
};
|