1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/src/migrations/20231221143955-feedback-table.js
2023-12-21 15:34:35 +02:00

29 lines
643 B
JavaScript

'use strict';
exports.up = function (db, callback) {
db.runSql(
`
CREATE TABLE IF NOT EXISTS feedback
(
id SERIAL PRIMARY KEY NOT NULL,
category TEXT NOT NULL,
user_type TEXT,
difficulty_score INTEGER,
positive TEXT,
areas_for_improvement TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT now()
);
`,
callback,
);
};
exports.down = function (db, callback) {
db.runSql(
`
DROP TABLE IF EXISTS feedback;
`,
callback,
);
};