Skip to content

Commit

Permalink
feat: add statement_timeout to migration
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci998 committed Oct 14, 2024
1 parent b1e7bf2 commit 188b047
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { Knex } from 'knex';

export async function up(knex: Knex): Promise<void> {
await knex.raw(`set statement_timeout to 0`);
await knex.raw(
'ALTER TABLE evm_internal_transaction ALTER COLUMN "id" SET DATA TYPE bigint'
);
await knex.raw('ALTER SEQUENCE evm_internal_transaction_id_seq AS bigint');
}

export async function down(knex: Knex): Promise<void> {
await knex.raw(`set statement_timeout to 0`);
await knex.raw(
'ALTER TABLE evm_internal_transaction ALTER COLUMN "id" SET DATA TYPE integer'
);
Expand Down

0 comments on commit 188b047

Please sign in to comment.