mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-01 04:34:24 +01:00
Index nostr_tags.name
This commit is contained in:
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();
|
||||
}
|
||||
Reference in New Issue
Block a user