1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/migrations/20210119084617-add-addon-table.js
Ivar Conradi Østhus 17c8fe7710 feat: Introduce addon framework
fixes: #587

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-02-05 15:20:00 +01:00

21 lines
494 B
JavaScript

exports.up = function(db, cb) {
db.runSql(
`CREATE TABLE IF NOT EXISTS addons
(
id SERIAL PRIMARY KEY,
provider text not null,
description text,
enabled boolean default true,
parameters json,
events json,
created_at TIMESTAMP WITH TIME ZONE DEFAULT now()
);
`,
cb,
);
};
exports.down = function(db, cb) {
db.runSql(`DROP TABLE addons;`, cb);
};