mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-23 14:38:00 +00:00
* initial commit * fix * Fixes * Fix dropping widget width while dragging * Fix group selection in form * fix when dropping a component, shadow is coming on top of component manager. * improve performace on useGroupedTargetsScrollHandler * Fix * Revamp pages in editor and viewer * bug fixes * merge base * fix conflicts * fix conflicts * bug fixes * bug fixes * fix: pages icon and layout for right sidebar * fix: styling for pages menu * fix base styling * merge base * bug fixes * bug fixes * fix top styling of nav bar * add border to canvas * bug fixes * bug fixes * update reference * bug fix --------- Co-authored-by: Nakul Nagargade <nakul@tooljet.com>
56 lines
1.6 KiB
TypeScript
56 lines
1.6 KiB
TypeScript
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
|
|
|
|
export class ModifyPagesTableForDifferentNavs1749766539146 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.addColumn(
|
|
'pages',
|
|
new TableColumn({
|
|
name: 'url',
|
|
type: 'varchar',
|
|
isNullable: true,
|
|
})
|
|
);
|
|
|
|
if (queryRunner.connection.driver.options.type === 'postgres') {
|
|
await queryRunner.query(`
|
|
CREATE TYPE "page_open_in_enum" AS ENUM ('new_tab', 'same_tab')
|
|
`);
|
|
}
|
|
await queryRunner.addColumn(
|
|
'pages',
|
|
new TableColumn({
|
|
name: 'open_in',
|
|
type: queryRunner.connection.driver.options.type === 'postgres' ? 'page_open_in_enum' : 'varchar',
|
|
default: `'new_tab'`,
|
|
isNullable: false,
|
|
})
|
|
);
|
|
|
|
if (queryRunner.connection.driver.options.type === 'postgres') {
|
|
await queryRunner.query(`
|
|
CREATE TYPE "page_type_enum" AS ENUM ('default', 'group', 'url', 'app')
|
|
`);
|
|
}
|
|
await queryRunner.addColumn(
|
|
'pages',
|
|
new TableColumn({
|
|
name: 'type',
|
|
type: queryRunner.connection.driver.options.type === 'postgres' ? 'page_type_enum' : 'varchar',
|
|
default: `'default'`,
|
|
isNullable: false,
|
|
})
|
|
);
|
|
|
|
await queryRunner.addColumn(
|
|
'pages',
|
|
new TableColumn({
|
|
name: 'app_id',
|
|
type: 'varchar',
|
|
isNullable: false,
|
|
default: `''`,
|
|
})
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {}
|
|
}
|