forked from 0xPolygonHermez/zkevm-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migration + tests and queries (0xPolygonHermez#2625) (0xPolygonHermez…
- Loading branch information
Showing
4 changed files
with
64 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
-- +migrate Up | ||
CREATE INDEX IF NOT EXISTS l2block_block_hash_idx ON state.l2block (block_hash); | ||
|
||
ALTER TABLE state.sequences ADD PRIMARY KEY(from_batch_num); | ||
ALTER TABLE state.trusted_reorg ADD PRIMARY KEY(timestamp); | ||
ALTER TABLE state.sync_info ADD PRIMARY KEY(last_batch_num_seen, last_batch_num_consolidated, init_sync_batch); | ||
|
||
-- +migrate Down | ||
DROP INDEX IF EXISTS state.l2block_block_hash_idx; | ||
|
||
ALTER TABLE state.sequences DROP CONSTRAINT sequences_pkey; | ||
ALTER TABLE state.trusted_reorg DROP CONSTRAINT trusted_reorg_pkey; | ||
ALTER TABLE state.sync_info DROP CONSTRAINT sync_info_pkey; |
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
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