Create PageLayout resolver and controller (#14219)

Closes https://github.com/twentyhq/core-team-issues/issues/1393
This commit is contained in:
Raphaël Bosi
2025-09-02 16:12:18 +02:00
committed by GitHub
parent 92c27b337a
commit fed09339f6
35 changed files with 2545 additions and 7 deletions
@@ -0,0 +1,25 @@
import { type MigrationInterface, type QueryRunner } from 'typeorm';
export class CreatePartialIndexForPageLayout1756816245841
implements MigrationInterface
{
name = 'CreatePartialIndexForPageLayout1756816245841';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`DROP INDEX "core"."IDX_PAGE_LAYOUT_WORKSPACE_ID_OBJECT_METADATA_ID"`,
);
await queryRunner.query(
`CREATE INDEX "IDX_PAGE_LAYOUT_WORKSPACE_ID_OBJECT_METADATA_ID" ON "core"."pageLayout" ("workspaceId", "objectMetadataId") WHERE "deletedAt" IS NULL`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`DROP INDEX "core"."IDX_PAGE_LAYOUT_WORKSPACE_ID_OBJECT_METADATA_ID"`,
);
await queryRunner.query(
`CREATE INDEX "IDX_PAGE_LAYOUT_WORKSPACE_ID_OBJECT_METADATA_ID" ON "core"."pageLayout" ("workspaceId", "objectMetadataId") `,
);
}
}