Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew7234 committed Dec 12, 2023
1 parent 62c2e48 commit 126f794
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion storage/migrations/00_consensus.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ CREATE TABLE chain.latest_node_heights
);

-- Indexing Progress Management
CREATE TABLE analysis.processed_blocks -- Moved to analysis.processed_blocks in 06_analysis_schema.up.sql
CREATE TABLE analysis.processed_blocks
(
height UINT63 NOT NULL,
analyzer TEXT NOT NULL,
Expand Down
7 changes: 4 additions & 3 deletions storage/migrations/01_runtimes.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,15 @@ CREATE TABLE chain.evm_tokens
last_download_round UINT63
);

CREATE TABLE analysis.evm_token_balances -- Moved to analysis.evm_token_balances in 06_analysis_schema.up.sql
CREATE TABLE analysis.evm_token_balances
(
runtime runtime NOT NULL,
-- This table is used to track balance querying primarily for EVM tokens (ERC-20, ERC-271, etc), but also for
-- the runtime-native token; the latter is represented with a special addr: oasis1runt1menat1vet0ken0000000000000000000000
token_address oasis_addr NOT NULL,
account_address oasis_addr NOT NULL,
PRIMARY KEY (runtime, token_address, account_address),

last_mutate_round UINT63 NOT NULL,
last_download_round UINT63
);
Expand Down Expand Up @@ -303,7 +304,7 @@ CREATE TABLE chain.evm_nfts (
last_download_round UINT63,

owner oasis_addr,
num_transfers INT NOT NULL,
num_transfers INT NOT NULL DEFAULT 0,
metadata JSONB,
metadata_uri TEXT,
metadata_accessed TIMESTAMP,
Expand Down Expand Up @@ -356,7 +357,7 @@ CREATE TABLE chain.runtime_sdk_balances (
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

-- Grant others read-only use.
-- (We granted already in 01_consensus.up.sql, but the grant does not apply to new tables.)
-- (We granted already in 00_consensus.up.sql, but the grant does not apply to new tables.)
GRANT SELECT ON ALL TABLES IN SCHEMA chain TO PUBLIC;
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA chain TO PUBLIC;
GRANT SELECT ON ALL TABLES IN SCHEMA analysis TO PUBLIC;
Expand Down

0 comments on commit 126f794

Please sign in to comment.