-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor for multiple go migrations and add test fixtures
- Loading branch information
1 parent
76fc0b8
commit 3d2f239
Showing
16 changed files
with
719 additions
and
111 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
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
21 changes: 21 additions & 0 deletions
21
core/store/migrate/plugins/relayer/evm/forwardersDown.tmpl.sql
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,21 @@ | ||
-- Do nothing for `evm` schema for backward compatibility | ||
{{ if ne .Schema "evm"}} | ||
/* | ||
DROP TABLE {{ .Schema }}.receipts | ||
DROP TABLE {{ .Schema }}.tx_attempts | ||
DROP TABLE {{ .Schema }}.upkeep_states | ||
DROP TABLE {{ .Schema }}.txes | ||
DROP TABLE {{ .Schema }}.logs | ||
DROP TABLE {{ .Schema }}.log_poller_filters | ||
DROP TABLE {{ .Schema }}.log_poller_blocks | ||
DROP TABLE {{ .Schema }}.key_states; | ||
DROP TABLE {{ .Schema }}.heads; | ||
*/ | ||
|
||
-- Copy data from old table to new table | ||
INSERT INTO evm.forwarders (address, created_at, updated_at, evm_chain_id) | ||
SELECT address, created_at, updated_at, '{{ .ChainID }}' | ||
FROM {{ .Schema }}.forwarders; | ||
|
||
DROP TABLE {{ .Schema }}.forwarders; | ||
{{ end}} |
Oops, something went wrong.