1
0
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:
Mateusz Kwasniewski 2022-11-15 09:15:56 +01:00 committed by GitHub
parent ca328d6bcf
commit 4f65ad555f
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_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,
);
};