Add event stats indexes

This commit is contained in:
Alex Gleason 2024-03-02 21:20:43 -06:00
parent e4f53b3936
commit 2972cb4b6d
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
import { Kysely } from '@/deps.ts';
export async function up(db: Kysely<any>): Promise<void> {
await db.schema.createIndex('idx_author_stats_pubkey').on('author_stats').column('pubkey').execute();
await db.schema.createIndex('idx_event_stats_event_id').on('event_stats').column('event_id').execute();
}
export async function down(db: Kysely<any>): Promise<void> {
await db.schema.dropIndex('idx_author_stats_pubkey').on('author_stats').execute();
await db.schema.dropIndex('idx_event_stats_event_id').on('event_stats').execute();
}