Skip to content

Commit

Permalink
fix: remove foreign key proxy_contract in proxy_history
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci998 committed Aug 5, 2024
1 parent be77cd3 commit 7612071
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Knex } from 'knex';
import { EvmProxyHistory } from '../../src/models/evm_proxy_history';

export async function up(knex: Knex): Promise<void> {
await knex.schema.alterTable(EvmProxyHistory.tableName, (table) => {
table.dropForeign('proxy_contract');
});
}

export async function down(knex: Knex): Promise<void> {
await knex.schema.alterTable(EvmProxyHistory.tableName, (table) => {
table
.foreign('proxy_contract')
.references('address')
.inTable('evm_smart_contract');
});
}

0 comments on commit 7612071

Please sign in to comment.