mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
26 lines
693 B
JavaScript
26 lines
693 B
JavaScript
|
'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,
|
||
|
);
|
||
|
};
|