mirror of https://github.com/immich-app/immich.git
fix(server): add original path and library id index to asset (#4410)
* fix: add original path index * fix: use libraryId for index, too * fix: revert openapi changepull/4422/head
parent
29981b1088
commit
f57acc0802
@ -0,0 +1,13 @@
|
|||||||
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||||
|
|
||||||
|
export class AddOriginalPathIndex1696888644031 implements MigrationInterface {
|
||||||
|
name = 'AddOriginalPathIndex1696888644031';
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`CREATE INDEX "IDX_originalPath_libraryId" ON "assets" ("originalPath", "libraryId")`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`DROP INDEX "public"."IDX_originalPath_libraryId"`);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue