summaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-02-15 04:29:57 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-02-15 04:29:57 +0900
commit5ccd5ad56e0cd013deb5f73de26aa3d298deec77 (patch)
treee62d271c126037495b6db745d510304a60aafa78 /migration
parentUse em (diff)
downloadsharkey-5ccd5ad56e0cd013deb5f73de26aa3d298deec77.tar.gz
sharkey-5ccd5ad56e0cd013deb5f73de26aa3d298deec77.tar.bz2
sharkey-5ccd5ad56e0cd013deb5f73de26aa3d298deec77.zip
Add driveFiles index
Diffstat (limited to 'migration')
-rw-r--r--migration/1581708415836-drive-user-folder-id-index.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/migration/1581708415836-drive-user-folder-id-index.ts b/migration/1581708415836-drive-user-folder-id-index.ts
new file mode 100644
index 0000000000..e7a7628ff0
--- /dev/null
+++ b/migration/1581708415836-drive-user-folder-id-index.ts
@@ -0,0 +1,14 @@
+import {MigrationInterface, QueryRunner} from "typeorm";
+
+export class driveUserFolderIdIndex1581708415836 implements MigrationInterface {
+ name = 'driveUserFolderIdIndex1581708415836'
+
+ public async up(queryRunner: QueryRunner): Promise<any> {
+ await queryRunner.query(`CREATE INDEX "IDX_55720b33a61a7c806a8215b825" ON "drive_file" ("userId", "folderId", "id") `, undefined);
+ }
+
+ public async down(queryRunner: QueryRunner): Promise<any> {
+ await queryRunner.query(`DROP INDEX "IDX_55720b33a61a7c806a8215b825"`, undefined);
+ }
+
+}