2026-03-03 14:20:21 +00:00
|
|
|
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
|
|
|
|
|
|
2026-03-25 10:32:57 +00:00
|
|
|
export class AddPageHeaderAndFooterColumnsToPagesTable1767700000001 implements MigrationInterface {
|
2026-03-03 14:20:21 +00:00
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
2026-03-25 10:32:57 +00:00
|
|
|
await queryRunner.addColumns('pages', [
|
2026-03-03 14:20:21 +00:00
|
|
|
new TableColumn({
|
|
|
|
|
name: 'page_header',
|
2026-03-05 15:32:47 +00:00
|
|
|
type: 'jsonb',
|
|
|
|
|
isNullable: true,
|
2026-03-25 10:32:57 +00:00
|
|
|
}),
|
|
|
|
|
new TableColumn({
|
|
|
|
|
name: 'page_footer',
|
|
|
|
|
type: 'jsonb',
|
|
|
|
|
isNullable: true,
|
|
|
|
|
}),
|
|
|
|
|
]);
|
2026-03-03 14:20:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
2026-03-25 10:32:57 +00:00
|
|
|
await queryRunner.dropColumn('pages', 'page_footer');
|
2026-03-03 14:20:21 +00:00
|
|
|
await queryRunner.dropColumn('pages', 'page_header');
|
|
|
|
|
}
|
|
|
|
|
}
|