mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
30 lines
788 B
TypeScript
30 lines
788 B
TypeScript
|
|
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
|
||
|
|
|
||
|
|
export class AddPriorityAndEnabledColumnsToAppEnvironments1686818129241 implements MigrationInterface {
|
||
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.addColumn(
|
||
|
|
'app_environments',
|
||
|
|
new TableColumn({
|
||
|
|
name: 'priority',
|
||
|
|
type: 'integer',
|
||
|
|
isNullable: true,
|
||
|
|
default: 1,
|
||
|
|
})
|
||
|
|
);
|
||
|
|
|
||
|
|
await queryRunner.addColumn(
|
||
|
|
'app_environments',
|
||
|
|
new TableColumn({
|
||
|
|
name: 'enabled',
|
||
|
|
type: 'boolean',
|
||
|
|
isNullable: false,
|
||
|
|
default: true,
|
||
|
|
})
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.dropColumns('app_environments', ['priority', 'enabled']);
|
||
|
|
}
|
||
|
|
}
|