1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

feat: Change request rejections db table (#4486)

This commit is contained in:
Mateusz Kwasniewski 2023-08-14 13:00:21 +02:00 committed by GitHub
parent aafb2271be
commit 8fd5e21b4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,25 @@
'use strict';
exports.up = function (db, callback) {
db.runSql(
`
CREATE TABLE IF NOT EXISTS change_request_rejections (
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(),
UNIQUE (change_request_id, created_by)
);
`,
callback,
);
};
exports.down = function (db, callback) {
db.runSql(
`
DROP TABLE IF EXISTS change_request_rejections;
`,
callback,
);
};