mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +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>
30 lines
895 B
TypeScript
30 lines
895 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class MigrateHiddenValueFromBooleanToJson1750659565297 implements MigrationInterface {
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
|
|
await queryRunner.query(`ALTER TABLE pages RENAME COLUMN hidden TO hidden_old`);
|
|
|
|
await queryRunner.query(`ALTER TABLE pages ADD COLUMN hidden jsonb`);
|
|
|
|
const pages = await queryRunner.query(`SELECT id, hidden_old FROM pages`);
|
|
for (const page of pages) {
|
|
const newValue = {
|
|
value: `{{${page.hidden_old}}}`,
|
|
fxActive: false,
|
|
};
|
|
|
|
await queryRunner.query(
|
|
`UPDATE pages SET hidden = $1 WHERE id = $2`,
|
|
[JSON.stringify(newValue), page.id]
|
|
);
|
|
}
|
|
|
|
await queryRunner.query(`ALTER TABLE pages DROP COLUMN hidden_old`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
}
|
|
|
|
}
|