mirror of
https://github.com/immich-app/immich.git
synced 2025-10-25 15:52:33 -04:00
18 lines
533 B
TypeScript
18 lines
533 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class CreateExifTextSearchIndex1646249734844 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
CREATE INDEX exif_text_searchable_idx
|
|
ON exif
|
|
USING GIN (exif_text_searchable_column);
|
|
`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
DROP INDEX IF EXISTS exif_text_searchable_idx ON exif;
|
|
`);
|
|
}
|
|
}
|