Skip to content

Commit

Permalink
Rename table to be more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
user committed Dec 14, 2023
1 parent 9302681 commit fbdbb78
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

-- migrate:up

ALTER TABLE failsafe_transaction_hash RENAME TO failsafe_transaction_hash_log_index;

-- migrate:down

ALTER TABLE failsafe_transaction_hash_log_index RENAME TO failsafe_transaction_hash;
4 changes: 2 additions & 2 deletions lib/databases/postgres/failsafe/failsafe.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package failsafe
// Context to use for when failsafe acquisition goes wrong
const Context = "POSTGRES/FAILSAFE"

// TableFailsafeTransactionHashIndex to be used as the final check before
// TableFailsafeTransactionHashLogIndex to be used as the final check before
// a side effectful action where duplication could possibly happen at the
// infra level
const TableFailsafeTransactionHashIndex = "failsafe_transaction_hash_index"
const TableFailsafeTransactionHashLogIndex = "failsafe_transaction_hash_log_index"
2 changes: 1 addition & 1 deletion lib/databases/postgres/failsafe/transaction_hash_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func CommitTransactionHashIndex(transactionHash ethereum.Hash, logIndex misc.Big
$3
)`,

TableFailsafeTransactionHashIndex,
TableFailsafeTransactionHashLogIndex,
)

workerId := util.GetWorkerId()
Expand Down

0 comments on commit fbdbb78

Please sign in to comment.