mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-26 07:57:17 +00:00
28 lines
699 B
TypeScript
28 lines
699 B
TypeScript
|
|
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
|
||
|
|
|
||
|
|
export class AddFieldsToUser1664352379065 implements MigrationInterface {
|
||
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.addColumn(
|
||
|
|
'users',
|
||
|
|
new TableColumn({
|
||
|
|
name: 'company_size',
|
||
|
|
type: 'varchar',
|
||
|
|
isNullable: true,
|
||
|
|
})
|
||
|
|
);
|
||
|
|
|
||
|
|
await queryRunner.addColumn(
|
||
|
|
'users',
|
||
|
|
new TableColumn({
|
||
|
|
name: 'company_name',
|
||
|
|
type: 'varchar',
|
||
|
|
isNullable: true,
|
||
|
|
})
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.dropColumns('users', ['company_size', 'company_name']);
|
||
|
|
}
|
||
|
|
}
|