mirror of
https://github.com/immich-app/immich.git
synced 2025-06-23 15:30:51 -04:00
14 lines
509 B
TypeScript
14 lines
509 B
TypeScript
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 "IDX_originalPath_libraryId"`);
|
|
}
|
|
}
|