diff --git a/src/migrations/20240305131822-add-scim-id-column-to-user.js b/src/migrations/20240305131822-add-scim-id-column-to-user.js new file mode 100644 index 000000000000..76e5229921fb --- /dev/null +++ b/src/migrations/20240305131822-add-scim-id-column-to-user.js @@ -0,0 +1,13 @@ +exports.up = function(db, cb) { + db.runSql(` + ALTER TABLE users ADD COLUMN scim_id TEXT; + CREATE INDEX 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 users_scim_id_uniq_idx; + ALTER TABLE users DROP COLUMN scim_id; + `, cb); +};