mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
5e14e80ae3
1. Added database table for change request approvals 2. Removed separate endpoint for applying. **Now all state changes will go through same endpoint.**
25 lines
636 B
JavaScript
25 lines
636 B
JavaScript
'use strict';
|
|
|
|
exports.up = function (db, callback) {
|
|
db.runSql(
|
|
`
|
|
CREATE TABLE IF NOT EXISTS change_request_approvals (
|
|
id serial primary key,
|
|
change_request_id integer NOT NULL REFERENCES change_requests(id) ON DELETE CASCADE,
|
|
created_by integer not null references users (id) ON DELETE CASCADE,
|
|
created_at timestamp default now()
|
|
);
|
|
`,
|
|
callback,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, callback) {
|
|
db.runSql(
|
|
`
|
|
DROP TABLE IF EXISTS change_request_approvals;
|
|
`,
|
|
callback,
|
|
);
|
|
};
|