mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
18 lines
292 B
JavaScript
18 lines
292 B
JavaScript
|
exports.up = function (db, cb) {
|
||
|
db.runSql(
|
||
|
`
|
||
|
ALTER TABLE roles ADD CONSTRAINT unique_name UNIQUE (name);
|
||
|
`,
|
||
|
cb,
|
||
|
);
|
||
|
};
|
||
|
|
||
|
exports.down = function (db, cb) {
|
||
|
db.runSql(
|
||
|
`
|
||
|
ALTER TABLE roles DROP CONSTRAINT unique_name;
|
||
|
`,
|
||
|
cb,
|
||
|
);
|
||
|
};
|