feat: initial kysely migration file (#17678)

This commit is contained in:
Jason Rasmussen 2025-04-17 17:38:47 -04:00 committed by GitHub
parent e275f2d8b3
commit 6474a78b8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 499 additions and 139 deletions

View 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";`);
}
}