1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/src/migrations/20220808084524-add-group-permissions.js
Simon Hornby 38e428dacf
Fix/remove group owner concept (#1905)
* fix: remove group user role
2022-08-11 08:23:08 +02:00

20 lines
364 B
JavaScript

'use strict';
exports.up = function (db, cb) {
db.runSql(
`
ALTER TABLE group_user DROP COLUMN IF EXISTS role;
`,
cb,
);
};
exports.down = function (db, cb) {
db.runSql(
`
ALTER TABLE group_user ADD COLUMN role text check(role in ('Owner', 'Member')) default 'Member';
`,
cb,
);
};