Skip to content

Commit

Permalink
chore: add scim id migration for groups (#6682)
Browse files Browse the repository at this point in the history
  • Loading branch information
sighphyre committed Mar 25, 2024
1 parent 79fcfc2 commit 2747dca
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/lib/types/openapi.d.ts
@@ -1,7 +1,6 @@
// Partial types for "@unleash/express-openapi".
declare module '@unleash/express-openapi' {
import type { RequestHandler } from 'express';
import type { OpenAPIV3 } from 'openapi-types';

export interface IExpressOpenApi extends RequestHandler {
validPath: (operation: OpenAPIV3.OperationObject) => RequestHandler;
Expand Down
18 changes: 18 additions & 0 deletions src/migrations/20240325081847-add-scim-id-for-groups.js
@@ -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,
);
};
6 changes: 1 addition & 5 deletions website/package.json
Expand Up @@ -52,11 +52,7 @@
"semver": "^7.5.3"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"production": [">0.5%", "not dead", "not op_mini all"],
"development": [
"last 1 chrome version",
"last 1 firefox version",
Expand Down

0 comments on commit 2747dca

Please sign in to comment.