mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-27 00:17:18 +00:00
23 lines
728 B
TypeScript
23 lines
728 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");
|
||
|
|
}
|
||
|
|
}
|