mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
This reverts the migration that introduced a new column to handle grid dimensions with enums count and percent. Upon further review, the migration is unnecessary as the application manages grid dimension adjustments dynamically on component load without the need for persisting these changes. This avoids unnecessary data modifications that impact high volumes of data, streamlining operations and maintaining performance.
32 lines
892 B
TypeScript
32 lines
892 B
TypeScript
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
|
|
|
|
export class AddAutoLayoutFlagToPagesTable1702196735455 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
// Add the new columns to the app_versions table
|
|
await queryRunner.addColumn(
|
|
'pages',
|
|
new TableColumn({
|
|
name: 'auto_compute_layout',
|
|
type: 'boolean',
|
|
isNullable: false,
|
|
default: 'false',
|
|
})
|
|
);
|
|
|
|
await queryRunner.addColumn(
|
|
'layouts',
|
|
new TableColumn({
|
|
name: 'dimension_unit',
|
|
type: 'enum',
|
|
enumName: 'dimension_unit',
|
|
enum: ['count', 'percent'],
|
|
isNullable: false,
|
|
default: `'percent'`,
|
|
})
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.dropColumn('pages', 'auto_compute_layout');
|
|
}
|
|
}
|