mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat: initial kysely migration file (#17678)
This commit is contained in:
parent
e275f2d8b3
commit
6474a78b8b
13 changed files with 499 additions and 139 deletions
13
server/src/migrations/1744910873956-AddMissingIndex.ts
Normal file
13
server/src/migrations/1744910873956-AddMissingIndex.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class AddMissingIndex1744910873956 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX IF NOT EXISTS "IDX_geodata_gist_earthcoord" ON "geodata_places" (ll_to_earth_public(latitude, longitude))`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP INDEX "IDX_geodata_gist_earthcoord";`);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue