mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
ff7be7696c
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
25 lines
590 B
JavaScript
25 lines
590 B
JavaScript
'use strict';
|
|
|
|
exports.up = function (db, callback) {
|
|
db.runSql(
|
|
`
|
|
ALTER TABLE users ADD "settings" json;
|
|
ALTER TABLE users ADD "permissions" json;
|
|
ALTER TABLE users ALTER COLUMN "permissions" SET DEFAULT '[]';
|
|
ALTER TABLE users DROP COLUMN "system_id";
|
|
`,
|
|
callback,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, callback) {
|
|
db.runSql(
|
|
`
|
|
ALTER TABLE users DROP COLUMN "settings";
|
|
ALTER TABLE users DROP COLUMN "permissions";
|
|
ALTER TABLE users ADD COLUMN "system_id" VARCHAR;
|
|
`,
|
|
callback,
|
|
);
|
|
};
|