Merge branch 'index-tag-name' into 'main'

Index nostr_tags.name

See merge request soapbox-pub/ditto!378
This commit is contained in:
Alex Gleason 2024-06-14 02:37:58 +00:00
commit fe46db3e04
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();
}