1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00
unleash.unleash/src/migrations/20221108114358-add-change-request-permissions.js

20 lines
613 B
JavaScript
Raw Normal View History

exports.up = function (db, cb) {
db.runSql(
`
INSERT INTO permissions (permission, display_name, type) VALUES ('APPROVE_CHANGE_REQUEST', 'Approve a change request', 'environment');
INSERT INTO permissions (permission, display_name, type) VALUES ('APPLY_CHANGE_REQUEST', 'Apply a change request', 'environment');
`,
cb,
);
};
exports.down = function (db, cb) {
db.runSql(
`
DELETE FROM permissions WHERE permission = 'APPROVE_CHANGE_REQUEST';
DELETE FROM permissions WHERE permission = 'APPLY_CHANGE_REQUEST';
`,
cb,
);
};