From 69c3c4e3dc71c722f9d85c4d2d6a112b6ce85296 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 11 Dec 2020 21:16:20 +0900 Subject: Resolve #6806 (#6935) * :v: * :v: * Update privacy.vue --- migration/1607353487793-isExplorable.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 migration/1607353487793-isExplorable.ts (limited to 'migration') diff --git a/migration/1607353487793-isExplorable.ts b/migration/1607353487793-isExplorable.ts new file mode 100644 index 0000000000..034f8c3845 --- /dev/null +++ b/migration/1607353487793-isExplorable.ts @@ -0,0 +1,18 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class isExplorable1607353487793 implements MigrationInterface { + name = 'isExplorable1607353487793' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "user" ADD "isExplorable" boolean NOT NULL DEFAULT true`); + await queryRunner.query(`COMMENT ON COLUMN "user"."isExplorable" IS 'Whether the User is explorable.'`); + await queryRunner.query(`CREATE INDEX "IDX_d5a1b83c7cab66f167e6888188" ON "user" ("isExplorable") `); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`DROP INDEX "IDX_d5a1b83c7cab66f167e6888188"`); + await queryRunner.query(`COMMENT ON COLUMN "user"."isExplorable" IS 'Whether the User is explorable.'`); + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "isExplorable"`); + } + +} -- cgit v1.2.3-freya