mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
ca329da4b4
This PR drops the previous PRs scim_id idx and replaces it with an actual UNIQUE index
14 lines
360 B
JavaScript
14 lines
360 B
JavaScript
exports.up = function(db, cb) {
|
|
db.runSql(`
|
|
ALTER TABLE users ADD COLUMN scim_id TEXT;
|
|
CREATE INDEX IF NOT EXISTS users_scim_id_uniq_idx ON users (scim_id) WHERE scim_id IS NOT NULL;
|
|
`, cb);
|
|
};
|
|
|
|
exports.down = function(db, cb) {
|
|
db.runSql(`
|
|
DROP INDEX IF EXISTS users_scim_id_uniq_idx;
|
|
ALTER TABLE users DROP COLUMN scim_id;
|
|
`, cb);
|
|
};
|