mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-30 18:07:20 +00:00
20 lines
670 B
TypeScript
20 lines
670 B
TypeScript
|
|
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
|
||
|
|
|
||
|
|
export class AddConfigurationColumnToInternalTables1718529294184 implements MigrationInterface {
|
||
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.addColumn(
|
||
|
|
'internal_tables',
|
||
|
|
new TableColumn({
|
||
|
|
name: 'configurations',
|
||
|
|
type: 'jsonb',
|
||
|
|
isNullable: false, // Set to false to make it NOT NULL
|
||
|
|
default: '\'{"columns": {"column_names":{}, "configurations":{}}}\'',
|
||
|
|
})
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.dropColumn('internal_tables', 'configurations');
|
||
|
|
}
|
||
|
|
}
|