Skip to content

Commit

Permalink
feat: create index evm_block(miner), validator(tokens), validator(sta…
Browse files Browse the repository at this point in the history
…tus)
  • Loading branch information
fibonacci998 committed Sep 9, 2024
1 parent f606d64 commit e35c155
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
15 changes: 15 additions & 0 deletions migrations/20240909092417_create_index_validator.ts
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 migrations/evm/20240909092542_create_index_miner_in_evm_block.ts
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');
});
}

0 comments on commit e35c155

Please sign in to comment.