From 96b5ecc4357558a06e19630094d1710b92d816d7 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 2 Mar 2024 19:23:28 -0600 Subject: [PATCH] Fix dropIndex calls --- src/db/migrations/011_kind_author_index.ts | 5 +---- src/db/migrations/012_tags_composite_index.ts | 9 +++------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/db/migrations/011_kind_author_index.ts b/src/db/migrations/011_kind_author_index.ts index e894aa3..da21988 100644 --- a/src/db/migrations/011_kind_author_index.ts +++ b/src/db/migrations/011_kind_author_index.ts @@ -9,8 +9,5 @@ export async function up(db: Kysely): Promise { } export async function down(db: Kysely): Promise { - await db.schema - .dropIndex('idx_events_kind_pubkey_created_at') - .on('events') - .execute(); + await db.schema.dropIndex('idx_events_kind_pubkey_created_at').execute(); } diff --git a/src/db/migrations/012_tags_composite_index.ts b/src/db/migrations/012_tags_composite_index.ts index 418df28..8769289 100644 --- a/src/db/migrations/012_tags_composite_index.ts +++ b/src/db/migrations/012_tags_composite_index.ts @@ -1,8 +1,8 @@ import { Kysely } from '@/deps.ts'; export async function up(db: Kysely): Promise { - await db.schema.dropIndex('idx_tags_tag').on('tags').execute(); - await db.schema.dropIndex('idx_tags_value').on('tags').execute(); + await db.schema.dropIndex('idx_tags_tag').execute(); + await db.schema.dropIndex('idx_tags_value').execute(); await db.schema .createIndex('idx_tags_tag_value') @@ -12,10 +12,7 @@ export async function up(db: Kysely): Promise { } export async function down(db: Kysely): Promise { - await db.schema - .dropIndex('idx_tags_tag_value') - .on('tags') - .execute(); + await db.schema.dropIndex('idx_tags_tag_value').execute(); await db.schema .createIndex('idx_tags_tag')