Skip to content

Commit d67de2b

Browse files
committed
fix: drop search function on migration file
1 parent 0edae83 commit d67de2b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/migrations/src/migrations/20241029T120000_initial.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,11 @@ export async function up(db: Kysely<any>): Promise<void> {
313313

314314
// eslint-disable-next-line @typescript-eslint/no-explicit-any
315315
export async function down(db: Kysely<any>): Promise<void> {
316+
const schema = getSchemaName(db.schema);
317+
const ref = (name: string): RawBuilder<unknown> => sql.table(`${schema}.${name}`);
318+
316319
// Drop everything in reverse order
320+
await sql`drop function if exists ${ref("search_projects")}`.execute(db);
317321
await db.schema.dropTable("legacy_projects").execute();
318322
await db.schema.dropTable("donations").execute();
319323
await db.schema.dropTable("applications_payouts").execute();

0 commit comments

Comments
 (0)