mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-10 01:19:53 +01:00
Adding this should allow us to only notify users that haven't been notified before. Necessary because the change_added event does not include a preData that allowed us to diff requestedApprovers based on the event alone. Also added a index on this column, since we're going to be using it to filter. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
11 lines
462 B
JavaScript
11 lines
462 B
JavaScript
exports.up = function(db, cb) {
|
|
db.runSql(`ALTER TABLE change_request_requested_approvers ADD COLUMN notified_at TIMESTAMP WITH TIME ZONE;
|
|
CREATE INDEX IF NOT EXISTS cr_req_approvers_notified_at_idx ON change_request_requested_approvers(notified_at);`, cb);
|
|
};
|
|
|
|
exports.down = function(db, cb) {
|
|
db.runSql(`
|
|
DROP INDEX IF EXISTS cr_req_approvers_notified_at_idx;
|
|
ALTER TABLE change_request_requested_approvers DROP COLUMN notified_at;`, cb);
|
|
};
|