mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix: missing index and geodata import process uses normal table (#17343)
* chore: add geodata indexes to table definitions * chore: rename incorrectly name geodata index * fix: import into geodata places with correct index names
This commit is contained in:
parent
97e52c5156
commit
2248a38567
3 changed files with 59 additions and 32 deletions
19
server/src/migrations/1743611339000-GeodataCleanup.ts
Normal file
19
server/src/migrations/1743611339000-GeodataCleanup.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class GeodataCleanup1743611339000 implements MigrationInterface {
|
||||
name = 'GeodataCleanup1743611339000';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER INDEX IF EXISTS "idx_geodata_places_admin2_alternate_names" RENAME TO "idx_geodata_places_alternate_names"`,
|
||||
);
|
||||
await queryRunner.query(`DROP TABLE IF EXISTS "geodata_places_tmp"`);
|
||||
await queryRunner.query(`DROP TABLE IF EXISTS "naturalearth_countries_tmp"`)
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER INDEX IF EXISTS "idx_geodata_places_alternate_names" RENAME TO "idx_geodata_places_admin2_alternate_names"`,
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue