mirror of
https://github.com/immich-app/immich.git
synced 2025-07-31 15:08:44 -04:00
refactor: rename geodata pk constraint to match runtime constraint name (#19856)
This commit is contained in:
parent
4ddd3764b4
commit
39c95f1280
@ -0,0 +1,9 @@
|
|||||||
|
import { Kysely, sql } from 'kysely';
|
||||||
|
|
||||||
|
export async function up(db: Kysely<any>): Promise<void> {
|
||||||
|
await sql`ALTER TABLE "geodata_places" DROP CONSTRAINT IF EXISTS "PK_c29918988912ef4036f3d7fbff4";`.execute(db);
|
||||||
|
await sql`ALTER TABLE "geodata_places" DROP CONSTRAINT IF EXISTS "geodata_places_pkey"`.execute(db);
|
||||||
|
await sql`ALTER TABLE "geodata_places" ADD CONSTRAINT "geodata_places_pkey" PRIMARY KEY ("id");`.execute(db);
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down(): Promise<void> {}
|
@ -1,6 +1,6 @@
|
|||||||
import { Column, Index, PrimaryColumn, Table, Timestamp } from 'src/sql-tools';
|
import { Column, Index, PrimaryColumn, Table, Timestamp } from 'src/sql-tools';
|
||||||
|
|
||||||
@Table({ name: 'geodata_places' })
|
@Table({ name: 'geodata_places', primaryConstraintName: 'geodata_places_pkey' })
|
||||||
@Index({
|
@Index({
|
||||||
name: 'idx_geodata_places_alternate_names',
|
name: 'idx_geodata_places_alternate_names',
|
||||||
using: 'gin',
|
using: 'gin',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user