mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-01 10:27:30 +00:00
27 lines
716 B
TypeScript
27 lines
716 B
TypeScript
import { MigrationInterface, QueryRunner, TableColumn, TableIndex } from 'typeorm';
|
|
|
|
export class AddSsoIdToUser1632047749315 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.addColumn(
|
|
'users',
|
|
new TableColumn({
|
|
name: 'sso_id',
|
|
type: 'varchar',
|
|
isNullable: true,
|
|
})
|
|
);
|
|
|
|
await queryRunner.createIndex(
|
|
'users',
|
|
new TableIndex({
|
|
name: 'IDX_SSO_ID',
|
|
columnNames: ['sso_id'],
|
|
})
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.dropIndex('users', 'IDX_SSO_ID');
|
|
await queryRunner.dropColumn('users', 'sso_id');
|
|
}
|
|
}
|