template header & footer margins
This commit is contained in:
parent
b5760202f7
commit
cfefcd81d7
10 changed files with 72 additions and 17 deletions
35
src/migrations/1735733514043-templateMargins.ts
Normal file
35
src/migrations/1735733514043-templateMargins.ts
Normal 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");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue