-
-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add scim id migration for groups
- Loading branch information
Showing
3 changed files
with
19 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
exports.up = function (db, cb) { | ||
db.runSql( | ||
` | ||
ALTER TABLE groups ADD COLUMN scim_id TEXT; | ||
CREATE UNIQUE INDEX groups_scim_id_unique_idx ON groups(scim_id) WHERE scim_id IS NOT NULL; | ||
`, | ||
cb, | ||
); | ||
}; | ||
|
||
exports.down = function (db, cb) { | ||
db.runSql( | ||
` | ||
DROP INDEX IF EXISTS groups_scim_id_unique_idx; | ||
ALTER TABLE groups DROP COLUMN scim_id;`, | ||
cb, | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters