-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Encryption dependency for signature parsing * Added migration to track ownership changes closes: #247
- Loading branch information
Carolyn Russell
committed
Nov 19, 2021
1 parent
ff3f143
commit 896a523
Showing
5 changed files
with
71 additions
and
6 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
59 changes: 59 additions & 0 deletions
59
database/src/main/resources/db/migration/V1_38__Add_scope_transfers.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,59 @@ | ||
SELECT 'Add nft_scope_value_owner_transfer' AS comment; | ||
CREATE TABLE IF NOT EXISTS nft_scope_value_owner_transfer | ||
( | ||
id SERIAL PRIMARY KEY, | ||
scope_id INT NOT NULL, | ||
scope_addr VARCHAR(128) NOT NULL, | ||
address VARCHAR(256) NOT NULL, | ||
tx_id INT NOT NULL, | ||
block_height INT NOT NULL, | ||
tx_hash VARCHAR(64) NOT NULL | ||
); | ||
|
||
CREATE UNIQUE INDEX IF NOT EXISTS nft_scope_vo_transfer_scope_address_tx_idx | ||
ON nft_scope_value_owner_transfer (scope_id, address, tx_id); | ||
CREATE INDEX IF NOT EXISTS nft_scope_vo_transfer_scope_id_idx ON nft_scope_value_owner_transfer (scope_id); | ||
CREATE INDEX IF NOT EXISTS nft_scope_vo_transfer_scope_addr_idx ON nft_scope_value_owner_transfer (scope_addr); | ||
CREATE INDEX IF NOT EXISTS nft_scope_vo_transfer_address_idx ON nft_scope_value_owner_transfer (address); | ||
CREATE INDEX IF NOT EXISTS nft_scope_vo_transfer_block_height_idx ON nft_scope_value_owner_transfer (block_height); | ||
|
||
|
||
SELECT 'Add nft_scope_owner_changes' AS comment; | ||
CREATE TABLE IF NOT EXISTS nft_scope_owner_changes | ||
( | ||
id SERIAL PRIMARY KEY, | ||
scope_id INT NOT NULL, | ||
scope_addr VARCHAR(128) NOT NULL, | ||
address VARCHAR(256) NOT NULL, | ||
role VARCHAR(256) NOT NULL, | ||
tx_id INT NOT NULL, | ||
block_height INT NOT NULL, | ||
tx_hash VARCHAR(64) NOT NULL | ||
); | ||
|
||
CREATE UNIQUE INDEX IF NOT EXISTS nft_scope_owner_changes_scope_address_role_tx_idx | ||
ON nft_scope_owner_changes (scope_id, address, role, tx_id); | ||
CREATE INDEX IF NOT EXISTS nft_scope_vo_transfer_scope_id_idx ON nft_scope_owner_changes (scope_id); | ||
CREATE INDEX IF NOT EXISTS nft_scope_vo_transfer_scope_addr_idx ON nft_scope_owner_changes (scope_addr); | ||
CREATE INDEX IF NOT EXISTS nft_scope_vo_transfer_address_idx ON nft_scope_owner_changes (address); | ||
CREATE INDEX IF NOT EXISTS nft_scope_vo_transfer_block_height_idx ON nft_scope_owner_changes (block_height); | ||
|
||
SELECT 'Add nft_scope_owner_changes' AS comment; | ||
CREATE TABLE IF NOT EXISTS nft_scope_owner_changes | ||
( | ||
id SERIAL PRIMARY KEY, | ||
scope_id INT NOT NULL, | ||
scope_addr VARCHAR(128) NOT NULL, | ||
address VARCHAR(256), | ||
role VARCHAR(256) NOT NULL, | ||
tx_id INT NOT NULL, | ||
block_height INT NOT NULL, | ||
tx_hash VARCHAR(64) NOT NULL | ||
); | ||
|
||
CREATE UNIQUE INDEX IF NOT EXISTS nft_scope_owner_changes_scope_address_role_tx_idx | ||
ON nft_scope_owner_changes (scope_id, address, role, tx_id); | ||
CREATE INDEX IF NOT EXISTS nft_scope_vo_transfer_scope_id_idx ON nft_scope_owner_changes (scope_id); | ||
CREATE INDEX IF NOT EXISTS nft_scope_vo_transfer_scope_addr_idx ON nft_scope_owner_changes (scope_addr); | ||
CREATE INDEX IF NOT EXISTS nft_scope_vo_transfer_address_idx ON nft_scope_owner_changes (address); | ||
CREATE INDEX IF NOT EXISTS nft_scope_vo_transfer_block_height_idx ON nft_scope_owner_changes (block_height); |
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