Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy committed May 24, 2023
1 parent 75eea33 commit 48ea072
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/event-db/migrations/V5__vote_plan.sql
Expand Up @@ -23,7 +23,7 @@ COMMENT ON COLUMN voteplan_category.public_key IS 'Does this vote plan category
-- groups

CREATE TABLE voting_group (
name TEXT PRIMARY KEY,
name TEXT PRIMARY KEY
);

INSERT INTO voting_group (name)
Expand Down
10 changes: 5 additions & 5 deletions src/event-db/migrations/V9__vitss_compatibility.sql
Expand Up @@ -132,10 +132,10 @@ CREATE VIEW voteplans AS SELECT
voteplan.category AS chain_voteplan_payload,
voteplan.encryption_key AS chain_vote_encryption_key,
event.row_id AS fund_id,
voting_group.token_id AS token_identifier
voteplan.token_id AS token_identifier
FROM voteplan
INNER JOIN event ON voteplan.event_id = event.row_id
INNER JOIN voting_group ON voteplan.group_id = voting_group.name;
INNER JOIN objective ON voteplan.objective_id = objective.row_id
INNER JOIN event ON objective.event = event.row_id;

COMMENT ON VIEW voteplans IS
'@omit
Expand Down Expand Up @@ -242,12 +242,12 @@ SELECT
pccc.proposal_metrics,
pvp.chain_proposal_index,
pvp.chain_voteplan_id,
gr.group_id
voteplan.group_id
FROM proposals p
INNER JOIN proposals_voteplans pvp ON p.id::VARCHAR = pvp.proposal_id
INNER JOIN voteplans vp ON pvp.chain_voteplan_id = vp.chain_voteplan_id
INNER JOIN challenges ch ON ch.id = p.challenge_id
INNER JOIN groups gr ON vp.token_identifier = gr.token_identifier
INNER JOIN voteplan ON voteplan.id = vp.chain_voteplan_id
LEFT JOIN proposal_simple_challenge psc
ON p.proposal_id = psc.proposal_id
AND ch.challenge_type = 'catalyst-simple'
Expand Down

0 comments on commit 48ea072

Please sign in to comment.