mirror of
https://github.com/immich-app/immich.git
synced 2025-07-31 15:08:44 -04:00
chore: remove migration (#20129)
This commit is contained in:
parent
0051a9bba5
commit
fc68cf4f32
@ -1,22 +1,10 @@
|
||||
import { Kysely, sql } from 'kysely';
|
||||
import { LoggingRepository } from 'src/repositories/logging.repository';
|
||||
// this file used to try to reset the `vchordrq.prewarm_dim;` parameter
|
||||
// that ends up being a problem on pg 15 + since the extension is not installed.
|
||||
|
||||
const logger = LoggingRepository.create('Migrations');
|
||||
|
||||
export async function up(db: Kysely<any>): Promise<void> {
|
||||
const { rows } = await sql<{ db: string }>`SELECT current_database() as db;`.execute(db);
|
||||
const databaseName = rows[0].db;
|
||||
try {
|
||||
await sql.raw(`ALTER DATABASE "${databaseName}" RESET vchordrq.prewarm_dim;`).execute(db);
|
||||
} catch {
|
||||
logger.warn('Failed to reset vchordrq.prewarm_dim, skipping');
|
||||
}
|
||||
export async function up(): Promise<void> {
|
||||
// noop
|
||||
}
|
||||
|
||||
export async function down(db: Kysely<any>): Promise<void> {
|
||||
const { rows } = await sql<{ db: string }>`SELECT current_database() as db;`.execute(db);
|
||||
const databaseName = rows[0].db;
|
||||
await sql
|
||||
.raw(`ALTER DATABASE "${databaseName}" SET vchordrq.prewarm_dim = '512,640,768,1024,1152,1536';`)
|
||||
.execute(db);
|
||||
export async function down(): Promise<void> {
|
||||
// noop
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user