-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: optimize query daily statistic
- Loading branch information
1 parent
9553e92
commit 995cd36
Showing
2 changed files
with
55 additions
and
21 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
migrations/evm/20240924084858_create_index_created_at_in_account.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Knex } from 'knex'; | ||
|
||
export async function up(knex: Knex): Promise<void> { | ||
await knex.raw('SET statement_timeout TO 0'); | ||
await knex.schema.alterTable('account', (table) => { | ||
table.index('created_at'); | ||
}); | ||
} | ||
|
||
export async function down(knex: Knex): Promise<void> { | ||
await knex.schema.alterTable('account', (table) => { | ||
table.dropIndex('created_at'); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters