mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-31 01:16:01 +02:00
Changeset comments schema (#2425)
This commit is contained in:
parent
ca328d6bcf
commit
4f65ad555f
25
src/migrations/20221114150559-change-request-comments.js
Normal file
25
src/migrations/20221114150559-change-request-comments.js
Normal file
@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
exports.up = function (db, callback) {
|
||||
db.runSql(
|
||||
`
|
||||
CREATE TABLE IF NOT EXISTS change_request_comments (
|
||||
id SERIAL PRIMARY KEY,
|
||||
change_request INTEGER NOT NULL REFERENCES change_requests(id) ON DELETE CASCADE,
|
||||
text TEXT NOT NULL,
|
||||
created_at TIMESTAMP default now(),
|
||||
created_by INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE
|
||||
);
|
||||
`,
|
||||
callback,
|
||||
);
|
||||
};
|
||||
|
||||
exports.down = function (db, callback) {
|
||||
db.runSql(
|
||||
`
|
||||
DROP TABLE IF EXISTS change_request_comments;
|
||||
`,
|
||||
callback,
|
||||
);
|
||||
};
|
Loading…
Reference in New Issue
Block a user