mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
Merge branch 'index-tag-name' into 'main'
Index nostr_tags.name See merge request soapbox-pub/ditto!378
This commit is contained in:
commit
fe46db3e04
1 changed files with 14 additions and 0 deletions
14
src/db/migrations/026_tags_name_index.ts
Normal file
14
src/db/migrations/026_tags_name_index.ts
Normal 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();
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue