-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
272 additions
and
511 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
-- +goose Up | ||
ALTER TABLE eth.header_cids | ||
ADD CONSTRAINT header_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.uncle_cids | ||
ADD CONSTRAINT uncle_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.uncle_cids | ||
ADD CONSTRAINT uncle_cids_header_cids_fkey | ||
FOREIGN KEY (header_id, block_number) | ||
REFERENCES eth.header_cids (block_hash, block_number); | ||
|
||
ALTER TABLE eth.transaction_cids | ||
ADD CONSTRAINT transaction_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.transaction_cids | ||
ADD CONSTRAINT transaction_cids_header_cids_fkey | ||
FOREIGN KEY (header_id, block_number) | ||
REFERENCES eth.header_cids (block_hash, block_number); | ||
|
||
ALTER TABLE eth.receipt_cids | ||
ADD CONSTRAINT receipt_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.receipt_cids | ||
ADD CONSTRAINT receipt_cids_transaction_cids_fkey | ||
FOREIGN KEY (tx_id, header_id, block_number) | ||
REFERENCES eth.transaction_cids (tx_hash, header_id, block_number); | ||
|
||
ALTER TABLE eth.state_cids | ||
ADD CONSTRAINT state_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.state_cids | ||
ADD CONSTRAINT state_cids_header_cids_fkey | ||
FOREIGN KEY (header_id, block_number) | ||
REFERENCES eth.header_cids (block_hash, block_number); | ||
|
||
ALTER TABLE eth.storage_cids | ||
ADD CONSTRAINT storage_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.storage_cids | ||
ADD CONSTRAINT storage_cids_state_cids_fkey | ||
FOREIGN KEY (state_leaf_key, header_id, block_number) | ||
REFERENCES eth.state_cids (state_leaf_key, header_id, block_number); | ||
|
||
ALTER TABLE eth.log_cids | ||
ADD CONSTRAINT log_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.log_cids | ||
ADD CONSTRAINT log_cids_receipt_cids_fkey | ||
FOREIGN KEY (rct_id, header_id, block_number) | ||
REFERENCES eth.receipt_cids (tx_id, header_id, block_number); | ||
|
||
-- +goose Down | ||
ALTER TABLE eth.log_cids | ||
DROP CONSTRAINT log_cids_receipt_cids_fkey; | ||
|
||
ALTER TABLE eth.log_cids | ||
DROP CONSTRAINT log_cids_ipld_blocks_fkey; | ||
|
||
ALTER TABLE eth.storage_cids | ||
DROP CONSTRAINT storage_cids_state_cids_fkey; | ||
|
||
ALTER TABLE eth.storage_cids | ||
DROP CONSTRAINT storage_cids_ipld_blocks_fkey; | ||
|
||
ALTER TABLE eth.state_cids | ||
DROP CONSTRAINT state_cids_header_cids_fkey; | ||
|
||
ALTER TABLE eth.state_cids | ||
DROP CONSTRAINT state_cids_ipld_blocks_fkey; | ||
|
||
ALTER TABLE eth.receipt_cids | ||
DROP CONSTRAINT receipt_cids_transaction_cids_fkey; | ||
|
||
ALTER TABLE eth.receipt_cids | ||
DROP CONSTRAINT receipt_cids_ipld_blocks_fkey; | ||
|
||
ALTER TABLE eth.transaction_cids | ||
DROP CONSTRAINT transaction_cids_header_cids_fkey; | ||
|
||
ALTER TABLE eth.transaction_cids | ||
DROP CONSTRAINT transaction_cids_ipld_blocks_fkey; | ||
|
||
ALTER TABLE eth.uncle_cids | ||
DROP CONSTRAINT uncle_cids_header_cids_fkey; | ||
|
||
ALTER TABLE eth.uncle_cids | ||
DROP CONSTRAINT uncle_cids_ipld_blocks_fkey; | ||
|
||
ALTER TABLE eth.header_cids | ||
DROP CONSTRAINT header_cids_ipld_blocks_fkey; |
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,105 @@ | ||
-- +goose Up | ||
ALTER TABLE eth.log_cids | ||
DROP CONSTRAINT log_cids_receipt_cids_fkey; | ||
|
||
ALTER TABLE eth.log_cids | ||
DROP CONSTRAINT log_cids_ipld_blocks_fkey; | ||
|
||
ALTER TABLE eth.storage_cids | ||
DROP CONSTRAINT storage_cids_state_cids_fkey; | ||
|
||
ALTER TABLE eth.storage_cids | ||
DROP CONSTRAINT storage_cids_ipld_blocks_fkey; | ||
|
||
ALTER TABLE eth.state_cids | ||
DROP CONSTRAINT state_cids_header_cids_fkey; | ||
|
||
ALTER TABLE eth.state_cids | ||
DROP CONSTRAINT state_cids_ipld_blocks_fkey; | ||
|
||
ALTER TABLE eth.receipt_cids | ||
DROP CONSTRAINT receipt_cids_transaction_cids_fkey; | ||
|
||
ALTER TABLE eth.receipt_cids | ||
DROP CONSTRAINT receipt_cids_ipld_blocks_fkey; | ||
|
||
ALTER TABLE eth.transaction_cids | ||
DROP CONSTRAINT transaction_cids_header_cids_fkey; | ||
|
||
ALTER TABLE eth.transaction_cids | ||
DROP CONSTRAINT transaction_cids_ipld_blocks_fkey; | ||
|
||
ALTER TABLE eth.uncle_cids | ||
DROP CONSTRAINT uncle_cids_header_cids_fkey; | ||
|
||
ALTER TABLE eth.uncle_cids | ||
DROP CONSTRAINT uncle_cids_ipld_blocks_fkey; | ||
|
||
ALTER TABLE eth.header_cids | ||
DROP CONSTRAINT header_cids_ipld_blocks_fkey; | ||
|
||
-- +goose Down | ||
ALTER TABLE eth.header_cids | ||
ADD CONSTRAINT header_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.uncle_cids | ||
ADD CONSTRAINT uncle_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.uncle_cids | ||
ADD CONSTRAINT uncle_cids_header_cids_fkey | ||
FOREIGN KEY (header_id, block_number) | ||
REFERENCES eth.header_cids (block_hash, block_number); | ||
|
||
ALTER TABLE eth.transaction_cids | ||
ADD CONSTRAINT transaction_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.transaction_cids | ||
ADD CONSTRAINT transaction_cids_header_cids_fkey | ||
FOREIGN KEY (header_id, block_number) | ||
REFERENCES eth.header_cids (block_hash, block_number); | ||
|
||
ALTER TABLE eth.receipt_cids | ||
ADD CONSTRAINT receipt_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.receipt_cids | ||
ADD CONSTRAINT receipt_cids_transaction_cids_fkey | ||
FOREIGN KEY (tx_id, header_id, block_number) | ||
REFERENCES eth.transaction_cids (tx_hash, header_id, block_number); | ||
|
||
ALTER TABLE eth.state_cids | ||
ADD CONSTRAINT state_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.state_cids | ||
ADD CONSTRAINT state_cids_header_cids_fkey | ||
FOREIGN KEY (header_id, block_number) | ||
REFERENCES eth.header_cids (block_hash, block_number); | ||
|
||
ALTER TABLE eth.storage_cids | ||
ADD CONSTRAINT storage_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.storage_cids | ||
ADD CONSTRAINT storage_cids_state_cids_fkey | ||
FOREIGN KEY (state_leaf_key, header_id, block_number) | ||
REFERENCES eth.state_cids (state_leaf_key, header_id, block_number); | ||
|
||
ALTER TABLE eth.log_cids | ||
ADD CONSTRAINT log_cids_ipld_blocks_fkey | ||
FOREIGN KEY (cid, block_number) | ||
REFERENCES ipld.blocks (key, block_number); | ||
|
||
ALTER TABLE eth.log_cids | ||
ADD CONSTRAINT log_cids_receipt_cids_fkey | ||
FOREIGN KEY (rct_id, header_id, block_number) | ||
REFERENCES eth.receipt_cids (tx_id, header_id, block_number); |
File renamed without changes.
13 changes: 0 additions & 13 deletions
13
db/migrations/uml_support/00001_create_ipfs_blocks_table.sql
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
db/migrations/uml_support/00004_create_eth_header_cids_table.sql
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
db/migrations/uml_support/00005_create_eth_uncle_cids_table.sql
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
db/migrations/uml_support/00006_create_eth_transaction_cids_table.sql
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
db/migrations/uml_support/00007_create_eth_receipt_cids_table.sql
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
db/migrations/uml_support/00008_create_eth_state_cids_table.sql
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
db/migrations/uml_support/00009_create_eth_storage_cids_table.sql
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
db/migrations/uml_support/00010_create_eth_log_cids_table.sql
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.