chore: remove migration (#20129)

This commit is contained in:
Jason Rasmussen 2025-07-24 10:11:53 -04:00 committed by GitHub
parent 0051a9bba5
commit fc68cf4f32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}