template header & footer margins

This commit is contained in:
Julian Krauser 2025-01-01 13:21:28 +01:00
parent b5760202f7
commit cfefcd81d7
10 changed files with 72 additions and 17 deletions

View file

@ -0,0 +1,35 @@
import { MigrationInterface, QueryRunner, TableColumn } from "typeorm";
import { DB_TYPE } from "../env.defaults";
export class TemplateMargins1735733514043 implements MigrationInterface {
name = "TemplateMargins1735733514043";
public async up(queryRunner: QueryRunner): Promise<void> {
const variableType_int = DB_TYPE == "mysql" ? "int" : "integer";
await queryRunner.addColumn(
"template_usage",
new TableColumn({
name: "headerHeight",
type: variableType_int,
default: null,
isNullable: true,
})
);
await queryRunner.addColumn(
"template_usage",
new TableColumn({
name: "footerHeight",
type: variableType_int,
default: null,
isNullable: true,
})
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropColumn("template_usage", "footerHeight");
await queryRunner.dropColumn("template_usage", "headerHeight");
}
}