1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/migrations/20221115072335-add-required-approvals.js
sjaanus 9176ffae1e
Change requests - add multiple reviewers (#2448)
This PR adds implements the frontend and migrations part of multiple
reviewers.

2 UI parts:

1. Configuration to add the count of required approvals
2. Handle multiple approvers in review page.
2022-11-17 11:08:29 +02:00

26 lines
728 B
JavaScript

'use strict';
exports.up = function (db, callback) {
db.runSql(
`
ALTER TABLE change_request_settings ADD COLUMN required_approvals integer default 1;
ALTER TABLE change_request_settings
ADD CONSTRAINT change_request_settings_project_environment_key
UNIQUE (project, environment)
`,
callback,
);
};
exports.down = function (db, callback) {
db.runSql(
`
ALTER TABLE change_request_settings DROP COLUMN IF EXISTS required_approvals;
ALTER TABLE change_request_settings
DROP CONSTRAINT IF EXISTS change_request_settings_project_environment_key;
`,
callback,
);
};