ToolJet/server/migrations/1752624000000-CreateSsoConfigOidcGroupSync.ts
Muhsin Shah C P 2d3f05ef39
Instance level OIDC common file changes (#12925)
* Working on data-migration

* Added entity file

* Changing login-configs service functions

* Changed some column names

* Fixed updating and creating sso-configs

* Changed the configs update and get apis & Worked on designs

* Added frontend & server files

* Working on oidc service

* Fixed instance signup case

* Fixed extra botton border  issue

* Fixed table updation issues

* Added frontend and backend files

* Added frontend commit file

* Refactor role assignment condition in AuthUtilService

* Update subproject commit reference in server/ee

* Update subproject commit reference in server/ee

* Fixed: no-permissioned group sync issues

* Fixed: migrations

* Fixed: editing the entity file

* Fixed: migration null check

* Updated subproject commit reference in server/ee

* Updated subproject commit reference in server/ee
2025-06-19 14:37:45 +05:30

67 lines
1.7 KiB
TypeScript

import { MigrationInterface, QueryRunner, Table } from 'typeorm';
export class CreateSsoConfigOidcGroupSync1752624000000 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({
name: 'sso_config_oidc_group_sync',
columns: [
{
name: 'id',
type: 'uuid',
isGenerated: true,
default: 'gen_random_uuid()',
isPrimary: true,
},
{
name: 'sso_config_id',
type: 'uuid',
isNullable: false,
},
{
name: 'organization_id',
type: 'uuid',
isNullable: true,
},
{
name: 'claim_name',
type: 'varchar',
isNullable: true,
},
{
name: 'group_mapping',
type: 'jsonb',
isNullable: true,
},
{
name: 'enable_group_sync',
type: 'boolean',
isNullable: true,
},
{
name: 'created_at',
type: 'timestamp',
default: 'now()',
},
{
name: 'updated_at',
type: 'timestamp',
default: 'now()',
},
],
foreignKeys: [
{
columnNames: ['sso_config_id'],
referencedColumnNames: ['id'],
referencedTableName: 'sso_configs',
onDelete: 'CASCADE',
},
],
})
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropTable('sso_config_oidc_group_sync');
}
}