Files
docmost-ryan/apps/server/src/database/migrations/1696635925309-page_children.ts
Philipinho e03b1f9f25 migrations
2024-01-30 00:22:29 +01:00

15 lines
498 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class PageChildren1696635925309 implements MigrationInterface {
name = 'PageChildren1696635925309'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "pages" ADD "children" uuid array NOT NULL DEFAULT '{}'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "pages" DROP COLUMN "children"`);
}
}