Skip to content

Commit cef11df

Browse files
committed
Revert "feat: New schema for reviews backend. | NPG-000 (#731)"
This reverts commit 54c4738.
1 parent 05f3bed commit cef11df

File tree

13 files changed

+68
-229
lines changed

13 files changed

+68
-229
lines changed

docker/voting-node.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ FROM jormungandr:latest as jorm
88

99
# stage 3
1010
FROM python as poetry
11-
RUN pip install poetry==2.0.1
11+
RUN pip install poetry==1.8.0
1212

1313
# Add python codebase
1414
COPY . /voting

services/voting-node/Earthfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ builder:
2121
zlib1g-dev
2222

2323
# Install Poetry
24-
RUN curl -sSL https://install.python-poetry.org | python3 - --version 2.0.1
24+
RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.8.0
2525

2626
SAVE IMAGE --cache-hint
2727

@@ -42,7 +42,6 @@ deps:
4242
RUN poetry config installer.max-workers 10
4343
# Install package dependencies without the voting_node package
4444
RUN poetry install --only main --no-root
45-
RUN poetry self add poetry-plugin-export
4645

4746
# Copy the voting_node source code
4847
COPY --dir voting_node README.md ./

src/event-db/migrations/V11__reviews.sql

Lines changed: 0 additions & 106 deletions
This file was deleted.

src/event-db/migrations/V4__catalyst_id.sql

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/event-db/migrations/V6__proposal_tables.sql renamed to src/event-db/migrations/V4__proposal_tables.sql

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -99,47 +99,52 @@ COMMENT ON COLUMN reviewer_level.event_id IS 'The specific Event ID this review
9999
CREATE TABLE proposal_review (
100100
row_id SERIAL PRIMARY KEY,
101101
proposal_id INTEGER NOT NULL,
102-
user_id INTEGER NOT NULL,
103102
assessor VARCHAR NOT NULL,
104103
assessor_level INTEGER,
104+
reward_address TEXT,
105105

106+
-- These fields are deprecated and WILL BE removed in a future migration.
107+
-- They MUST only be used for Vit-SS compatibility.
106108
impact_alignment_rating_given INTEGER,
107109
impact_alignment_note VARCHAR,
108110
feasibility_rating_given INTEGER,
109111
feasibility_note VARCHAR,
110112
auditability_rating_given INTEGER,
111113
auditability_note VARCHAR,
112-
allocated INTEGER,
113114
ranking INTEGER,
114115
flags JSONB NULL,
115116

116-
FOREIGN KEY (user_id) REFERENCES catalyst_user(row_id) ON DELETE SET NULL,
117-
FOREIGN KEY (proposal_id) REFERENCES proposal(row_id) ON DELETE CASCADE
117+
FOREIGN KEY (proposal_id) REFERENCES proposal(row_id) ON DELETE CASCADE,
118+
FOREIGN KEY (assessor_level) REFERENCES reviewer_level(row_id) ON DELETE CASCADE
118119
);
119120

120121
COMMENT ON TABLE proposal_review IS 'All Reviews.';
121122
COMMENT ON COLUMN proposal_review.row_id IS 'Synthetic Unique Key.';
122-
COMMENT ON COLUMN proposal_review.proposal_id IS 'The Proposal id this review belongs to.';
123-
COMMENT ON COLUMN proposal_review.user_id IS 'The user id this review belongs to.';
124-
COMMENT ON COLUMN proposal_review.assessor IS 'Assessors Anonymized ID.';
123+
COMMENT ON COLUMN proposal_review.proposal_id IS 'The Proposal this review is for.';
124+
COMMENT ON COLUMN proposal_review.assessor IS 'Assessors Anonymized ID';
125125
COMMENT ON COLUMN proposal_review.assessor_level IS 'Assessors level ID';
126+
COMMENT ON COLUMN proposal_review.reward_address IS 'Assessors reward address';
126127

127128
COMMENT ON COLUMN proposal_review.impact_alignment_rating_given IS
128-
'The numeric rating assigned to the proposal by the assessor.';
129+
'The numeric rating assigned to the proposal by the assessor.
130+
DEPRECATED: Only used for Vit-SS compatibility.';
129131
COMMENT ON COLUMN proposal_review.impact_alignment_note IS
130-
'A note about why the impact rating was given.';
132+
'A note about why the impact rating was given.
133+
DEPRECATED: Only used for Vit-SS compatibility.';
134+
131135
COMMENT ON COLUMN proposal_review.feasibility_rating_given IS
132-
'The numeric feasibility rating given.';
136+
'The numeric feasibility rating given.
137+
DEPRECATED: Only used for Vit-SS compatibility.';
133138
COMMENT ON COLUMN proposal_review.feasibility_note IS
134-
'A note about why the feasibility rating was given.';
139+
'A note about why the feasibility rating was given.
140+
DEPRECATED: Only used for Vit-SS compatibility.';
141+
135142
COMMENT ON COLUMN proposal_review.auditability_rating_given IS
136-
'The numeric auditability rating given.';
143+
'The numeric auditability rating given.
144+
DEPRECATED: Only used for Vit-SS compatibility.';
137145
COMMENT ON COLUMN proposal_review.auditability_note IS
138-
'A note about the auditability rating given.';
139-
140-
COMMENT ON COLUMN proposal_review.allocated IS
141-
'Describes if the review was part of the original reviewer allocation.
142-
';
146+
'A note about the auditability rating given.
147+
DEPRECATED: Only used for Vit-SS compatibility.';
143148

144149
COMMENT ON COLUMN proposal_review.ranking IS
145150
'Numeric Measure of quality of this review according to veteran community advisors.

src/event-db/migrations/V5__user.sql

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)