Skip to content

Commit

Permalink
fix: remove proposal constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
clockworkgr committed Mar 5, 2024
1 parent ac6c142 commit 4af9a89
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions database/schema/08-gov.sql
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ CREATE TABLE proposal_vote
voter_address TEXT NOT NULL REFERENCES account (address),
option TEXT NOT NULL,
timestamp TIMESTAMP,
height BIGINT NOT NULL,
CONSTRAINT unique_vote UNIQUE (proposal_id, voter_address)
height BIGINT NOT NULL
);
CREATE INDEX proposal_vote_proposal_id_index ON proposal_vote (proposal_id);
CREATE INDEX proposal_vote_voter_address_index ON proposal_vote (voter_address);
CREATE INDEX proposal_vote_height_index ON proposal_vote (height);

CREATE TABLE proposal_tally_result
(
proposal_id INTEGER REFERENCES proposal (id) PRIMARY KEY,
proposal_id INTEGER REFERENCES proposal (id),
yes TEXT NOT NULL,
abstain TEXT NOT NULL,
no TEXT NOT NULL,
Expand All @@ -65,7 +64,7 @@ CREATE INDEX proposal_tally_result_height_index ON proposal_tally_result (height

CREATE TABLE proposal_staking_pool_snapshot
(
proposal_id INTEGER REFERENCES proposal (id) PRIMARY KEY,
proposal_id INTEGER REFERENCES proposal (id),
bonded_tokens TEXT NOT NULL,
not_bonded_tokens TEXT NOT NULL,
height BIGINT NOT NULL
Expand Down

0 comments on commit 4af9a89

Please sign in to comment.