-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix several sync issues #583
Changes from 25 commits
a79d440
a48ab4f
edbac37
355b9ab
bcf26f3
f2c1706
a3c1bdb
118699a
7d63f89
bcba97f
f04e8a6
fc9ff4b
ff6003f
a7a1162
9921711
726fed7
87db383
fd3b3ed
8426a6b
c7ba4ff
c9660c3
f989590
b6e663a
4163e21
ac15bcc
d60edb2
4eed41e
8b1a5d7
7aa650c
c00878c
1481244
762ea6f
7516f21
2e78d3c
e7656e4
e7eba0e
21cf8cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ | |
|
||
config/config.mainnet.toml | ||
config/config.testnet.toml | ||
**__debug** |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- +migrate Up | ||
|
||
ALTER TABLE sync.deposit | ||
ADD COLUMN IF NOT EXISTS origin_rollup_id BIGINT DEFAULT 0; | ||
|
||
ALTER TABLE sync.claim DROP CONSTRAINT claim_pkey; | ||
ALTER TABLE sync.claim ADD PRIMARY KEY (index, rollup_index, mainnet_flag); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PK used to be
OTOH, index is unique per origin network, it's a counter (deposit count). And the way to index the origin network is with rollup index and mainnet flag, as explained in this comment:
|
||
|
||
-- +migrate Down | ||
|
||
ALTER TABLE sync.claim DROP CONSTRAINT claim_pkey; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be ADD PRIMARY KEY? |
||
ALTER TABLE sync.claim ADD PRIMARY KEY (network_id, index); | ||
|
||
ALTER TABLE sync.deposit | ||
DROP COLUMN IF EXISTS origin_rollup_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to review this after all the changes to rollup/network ID