mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-04 14:14:24 +01:00
Add event stats indexes
This commit is contained in:
11
src/db/migrations/014_stats_indexes.ts.ts
Normal file
11
src/db/migrations/014_stats_indexes.ts.ts
Normal 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();
|
||||
}
|
||||
Reference in New Issue
Block a user