mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat(server): optimize get asset query (#7176)
* faster query * add index * remove legacy code * update mock * remove unused imports * add relations * add stack * formatting * remove stack relation * remove unused import * increase chunk size * generate sql * linting * fix typing * formatting
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddFileCreatedAtIndex1708227417898 implements MigrationInterface {
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`CREATE INDEX idx_asset_file_created_at ON assets ("fileCreatedAt")`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP INDEX idx_asset_file_created_at`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user