Index nostr_tags.name

This commit is contained in:
Alex Gleason 2024-06-13 21:36:07 -05:00
parent 7186f49316
commit 91fe7acbd2
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
import { Kysely } from 'kysely';
export async function up(db: Kysely<any>): Promise<void> {
await db.schema
.createIndex('idx_tags_name')
.on('nostr_tags')
.column('name')
.ifNotExists()
.execute();
}
export async function down(db: Kysely<any>): Promise<void> {
await db.schema.dropIndex('idx_tags_name').ifExists().execute();
}