db/users: add indexes on users.pubkey and users.username
This commit is contained in:
parent
561ae9532a
commit
25e023aaf2
|
@ -0,0 +1,20 @@
|
|||
import { Kysely } from '@/deps.ts';
|
||||
|
||||
export async function up(db: Kysely<any>): Promise<void> {
|
||||
await db.schema
|
||||
.createIndex('idx_users_pubkey')
|
||||
.on('users')
|
||||
.column('pubkey')
|
||||
.execute();
|
||||
|
||||
await db.schema
|
||||
.createIndex('idx_users_username')
|
||||
.on('users')
|
||||
.column('username')
|
||||
.execute();
|
||||
}
|
||||
|
||||
export async function down(db: Kysely<any>): Promise<void> {
|
||||
await db.schema.dropIndex('idx_users_pubkey').execute();
|
||||
await db.schema.dropIndex('idx_users_username').execute();
|
||||
}
|
Loading…
Reference in New Issue