-
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: create index evm_block(miner), validator(tokens), validator(sta…
…tus)
- Loading branch information
1 parent
f606d64
commit e35c155
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
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,15 @@ | ||
import { Knex } from 'knex'; | ||
|
||
export async function up(knex: Knex): Promise<void> { | ||
await knex.schema.alterTable('validator', (table) => { | ||
table.index('tokens'); | ||
table.index('status'); | ||
}); | ||
} | ||
|
||
export async function down(knex: Knex): Promise<void> { | ||
await knex.schema.alterTable('validator', (table) => { | ||
table.dropIndex('tokens'); | ||
table.dropIndex('status'); | ||
}); | ||
} |
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
migrations/evm/20240909092542_create_index_miner_in_evm_block.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,13 @@ | ||
import { Knex } from 'knex'; | ||
|
||
export async function up(knex: Knex): Promise<void> { | ||
await knex.schema.alterTable('evm_block', (table) => { | ||
table.index('miner'); | ||
}); | ||
} | ||
|
||
export async function down(knex: Knex): Promise<void> { | ||
await knex.schema.alterTable('evm_block', (table) => { | ||
table.dropIndex('miner'); | ||
}); | ||
} |