Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
See PR #68
  • Loading branch information
RiccardoM authored Jan 5, 2021
1 parent f4b1e0b commit 60c6ff2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions schema/00-cosmos.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CREATE TABLE pre_commit
id SERIAL PRIMARY KEY,
validator_address TEXT NOT NULL REFERENCES validator (consensus_address),
timestamp TIMESTAMP WITHOUT TIME ZONE NOT NULL,
voting_power INTEGER NOT NULL,
voting_power BIGINT NOT NULL,
proposer_priority INTEGER NOT NULL
);

Expand All @@ -29,7 +29,7 @@ CREATE TABLE transaction
timestamp TIMESTAMP WITHOUT TIME ZONE NOT NULL,
gas_wanted INTEGER DEFAULT 0,
gas_used INTEGER DEFAULT 0,
height INTEGER NOT NULL,
height BIGINT NOT NULL,
hash TEXT NOT NULL UNIQUE PRIMARY KEY,
messages JSONB NOT NULL DEFAULT '[]'::JSONB,
fee JSONB NOT NULL DEFAULT '{}'::JSONB,
Expand Down
8 changes: 4 additions & 4 deletions schema/04-consensus.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ CREATE TABLE consensus
CREATE TABLE average_block_time_per_minute
(
average_time DECIMAL NOT NULL,
height INTEGER NOT NULL
height BIGINT NOT NULL
);

CREATE TABLE average_block_time_per_hour
(
average_time DECIMAL NOT NULL,
height INTEGER NOT NULL
height BIGINT NOT NULL
);

CREATE TABLE average_block_time_per_day
(
average_time DECIMAL NOT NULL,
height INTEGER NOT NULL
height BIGINT NOT NULL
);


CREATE TABLE average_block_time_from_genesis
(
average_time DECIMAL NOT NULL,
height INTEGER NOT NULL
height BIGINT NOT NULL
);

CREATE TABLE genesis
Expand Down
14 changes: 7 additions & 7 deletions schema/08-gov.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ CREATE TABLE proposal
CREATE TABLE tally_result
(
proposal_id INTEGER REFERENCES proposal (proposal_id),
yes INTEGER NOT NULL,
abstain INTEGER NOT NULL,
no INTEGER NOT NULL,
no_with_veto INTEGER NOT NULL,
height INTEGER NOT NULL,
yes BIGINT NOT NULL,
abstain BIGINT NOT NULL,
no BIGINT NOT NULL,
no_with_veto BIGINT NOT NULL,
height BIGINT NOT NULL,
PRIMARY KEY (proposal_id, height)
);

Expand All @@ -29,7 +29,7 @@ CREATE TABLE vote
proposal_id INTEGER REFERENCES proposal (proposal_id) NOT NULL,
voter TEXT REFERENCES account (address),
option TEXT NOT NULL,
height INTEGER NOT NULL,
height BIGINT NOT NULL,
PRIMARY KEY (proposal_id, voter, height)
);

Expand All @@ -39,6 +39,6 @@ CREATE TABLE deposit
depositor TEXT REFERENCES account (address),
amount COIN[],
total_deposit COIN[],
height INTEGER,
height BIGINT,
PRIMARY KEY (proposal_id, depositor, height)
);

0 comments on commit 60c6ff2

Please sign in to comment.