1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-23 00:22:19 +01:00

chore: add scim id migration for groups (#6682)

This commit is contained in:
Simon Hornby 2024-03-25 11:39:11 +02:00 committed by GitHub
parent 79fcfc26b8
commit 2747dcaba9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 6 deletions

View File

@ -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;

View File

@ -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,
);
};

View File

@ -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",