base structure for list printing with custom template

This commit is contained in:
Julian Krauser 2025-03-18 16:54:53 +01:00
parent e2a916f37d
commit a085de6e2f
19 changed files with 279 additions and 98 deletions

View file

@ -0,0 +1,25 @@
import { MigrationInterface, QueryRunner } from "typeorm";
import { templateUsage } from "../entity/configuration/templateUsage";
export class Listprinting1742311486232 implements MigrationInterface {
name = "Listprinting1742311486232";
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.manager
.createQueryBuilder()
.delete()
.from(templateUsage)
.where({ scope: "member.list" })
.execute();
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.manager
.createQueryBuilder()
.insert()
.into(templateUsage)
.values([{ scope: "member.list" }])
.orUpdate(["headerId", "bodyId", "footerId", "headerHeight", "footerHeight"], ["scope"])
.execute();
}
}