mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
migration(producitivty-report): cascade user unsubscription (#8655)
Remove opt-outs for deleted users. This is useful in tests, where we delete users permanently.
This commit is contained in:
parent
ef8417a08d
commit
471cb796c9
@ -0,0 +1,16 @@
|
||||
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);
|
||||
};
|
Loading…
Reference in New Issue
Block a user