Skip to content

Commit

Permalink
Update SQL schema
Browse files Browse the repository at this point in the history
  • Loading branch information
bonustrack committed Nov 10, 2021
1 parent f95d1fd commit 3d9d4ad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/helpers/database/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ CREATE TABLE proposals (
scores JSON NOT NULL,
scores_by_strategy JSON NOT NULL,
scores_state VARCHAR(24) NOT NULL,
scores_total DECIMAL(64,30) NOT NULL,
scores_updated BIGINT NOT NULL,
votes BIGINT NOT NULL,
PRIMARY KEY (id),
INDEX ipfs (ipfs),
INDEX author (author),
Expand All @@ -67,7 +70,9 @@ CREATE TABLE proposals (
INDEX space (space),
INDEX start (start),
INDEX end (end),
INDEX scores_state (scores_state)
INDEX scores_state (scores_state),
INDEX scores_updated (scores_updated),
INDEX votes (votes)
);

CREATE TABLE votes (
Expand All @@ -79,7 +84,7 @@ CREATE TABLE votes (
proposal VARCHAR(66) NOT NULL,
choice JSON NOT NULL,
metadata JSON NOT NULL,
vp BIGINT NOT NULL,
vp DECIMAL(64,30) NOT NULL,
vp_by_strategy JSON NOT NULL,
vp_state VARCHAR(24) NOT NULL,
PRIMARY KEY (id),
Expand Down

0 comments on commit 3d9d4ad

Please sign in to comment.