mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-28 00:47:53 +00:00
21 lines
629 B
TypeScript
21 lines
629 B
TypeScript
|
|
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
|
||
|
|
|
||
|
|
export class AddSourceToOrganizationUsers1716975639914 implements MigrationInterface {
|
||
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.addColumns('organization_users', [
|
||
|
|
new TableColumn({
|
||
|
|
name: 'source',
|
||
|
|
type: 'enum',
|
||
|
|
enumName: 'source',
|
||
|
|
enum: ['signup', 'invite'],
|
||
|
|
default: `'invite'`,
|
||
|
|
isNullable: false,
|
||
|
|
}),
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
|
||
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.dropColumns('organization_users', ['source']);
|
||
|
|
}
|
||
|
|
}
|