1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00
unleash.unleash/src/migrations/20221125185244-change-request-unique-approvals.js
2022-11-28 07:19:15 +01:00

18 lines
365 B
JavaScript

exports.up = function (db, cb) {
db.runSql(
`
ALTER TABLE change_request_approvals ADD CONSTRAINT unique_approvals UNIQUE (change_request_id, created_by);
`,
cb,
);
};
exports.down = function (db, cb) {
db.runSql(
`
ALTER TABLE change_request_approvals DROP CONSTRAINT unique_approvals;
`,
cb,
);
};