summaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-12-11 21:16:20 +0900
committerGitHub <noreply@github.com>2020-12-11 21:16:20 +0900
commit69c3c4e3dc71c722f9d85c4d2d6a112b6ce85296 (patch)
tree276f2dfa111772f8a2be5c5cabea2a4085d0c6a3 /migration
parentMerge pull request #6960 from syuilo/dependabot/npm_and_yarn/ws-7.4.1 (diff)
downloadsharkey-69c3c4e3dc71c722f9d85c4d2d6a112b6ce85296.tar.gz
sharkey-69c3c4e3dc71c722f9d85c4d2d6a112b6ce85296.tar.bz2
sharkey-69c3c4e3dc71c722f9d85c4d2d6a112b6ce85296.zip
Resolve #6806 (#6935)
* :v: * :v: * Update privacy.vue
Diffstat (limited to 'migration')
-rw-r--r--migration/1607353487793-isExplorable.ts18
1 files changed, 18 insertions, 0 deletions
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<void> {
+ 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<void> {
+ 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"`);
+ }
+
+}