1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-12 05:38:55 +09:00
cherrypick/migration/1605585339718-instance-pinned-pages.ts

15 lines
607 B
TypeScript
Raw Normal View History

import {MigrationInterface, QueryRunner} from "typeorm";
export class instancePinnedPages1605585339718 implements MigrationInterface {
name = 'instancePinnedPages1605585339718'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "meta" ADD "pinnedPages" character varying(512) array NOT NULL DEFAULT '{"/featured", "/channels", "/explore", "/pages", "/about-misskey"}'::varchar[]`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedPages"`);
}
}