mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-12 04:57:30 -07:00
Add driveFiles index
This commit is contained in:
parent
e01c10cd0c
commit
bcbf837299
3 changed files with 16 additions and 0 deletions
|
@ -12,6 +12,7 @@ unreleased
|
|||
|
||||
### 🐛Fixes
|
||||
* v12アップデート後にトップページアクセスでOops!になっちゃうのを修正
|
||||
* drive/files APIのパフォーマンスを改善
|
||||
|
||||
12.9.0 (2020/02/14)
|
||||
-------------------
|
||||
|
|
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);
|
||||
}
|
||||
|
||||
}
|
|
@ -4,6 +4,7 @@ import { DriveFolder } from './drive-folder';
|
|||
import { id } from '../id';
|
||||
|
||||
@Entity()
|
||||
@Index(['userId', 'folderId', 'id'])
|
||||
export class DriveFile {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
|
Loading…
Reference in a new issue