-
Notifications
You must be signed in to change notification settings - Fork 9
[FEATURE] Feedback system #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8b3b0ef
d3a8b4a
2bf8d11
4f5d50e
f6955bd
bbfa273
6484a9f
40f7295
7bd426c
35943d2
4f46629
84a6534
a7643a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/target | ||
*.db | ||
.env | ||
|
||
.idea/ | ||
.vscode/settings.json |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-- Add down migration script here | ||
|
||
DROP TABLE IF EXISTS mod_feedback; | ||
DROP TYPE IF EXISTS feedback_type; | ||
DROP INDEX IF EXISTS idx_mod_feedback_mod_version_id; | ||
DROP INDEX IF EXISTS idx_mod_feedback_reviewer_id; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-- Add up migration script here | ||
|
||
CREATE TYPE feedback_type AS ENUM | ||
('Positive', 'Negative', 'Suggestion', 'Note'); | ||
|
||
CREATE TABLE mod_feedback | ||
( | ||
id SERIAL PRIMARY KEY NOT NULL, | ||
mod_version_id INTEGER NOT NULL, | ||
reviewer_id INTEGER NOT NULL, | ||
feedback TEXT COLLATE pg_catalog."default" NOT NULL, | ||
decision BOOLEAN NOT NULL DEFAULT false, | ||
type feedback_type NOT NULL, | ||
dev bool NOT NULL DEFAULT false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this could get a little confusing, considering that "this person is a developer of this mod" is not constant. i'd rather this check be done during the sql query (like the admin field) instead of stored in the table There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah alr |
||
created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
CONSTRAINT mod_feedback_mod_version_id_fkey FOREIGN KEY (mod_version_id) | ||
REFERENCES public.mod_versions (id) | ||
ON DELETE CASCADE, | ||
CONSTRAINT mod_feedback_reviewer_id_fkey FOREIGN KEY (reviewer_id) | ||
REFERENCES public.developers (id) | ||
ON DELETE CASCADE | ||
); | ||
SorkoPiko marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
CREATE INDEX idx_mod_feedback_mod_version_id | ||
ON public.mod_feedback (mod_version_id); | ||
|
||
CREATE INDEX idx_mod_feedback_reviewer_id | ||
ON public.mod_feedback (reviewer_id); |
Uh oh!
There was an error while loading. Please reload this page.