Add driveFiles index
This commit is contained in:
parent
67da90530b
commit
5ccd5ad56e
3 changed files with 16 additions and 0 deletions
14
migration/1581708415836-drive-user-folder-id-index.ts
Normal file
14
migration/1581708415836-drive-user-folder-id-index.ts
Normal file
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue