diff --git a/mysql/docker-entrypoint-initdb.d/01_tables.sql b/mysql/docker-entrypoint-initdb.d/01_tables.sql index 3ea2c4ae..4f35990d 100644 --- a/mysql/docker-entrypoint-initdb.d/01_tables.sql +++ b/mysql/docker-entrypoint-initdb.d/01_tables.sql @@ -86,7 +86,7 @@ CREATE TABLE Predictions ( unknown_bot DECIMAL(5, 2) DEFAULT 0 ); -- Create a table for Feedback -CREATE TABLE PredictionFeedback ( +CREATE TABLE PredictionsFeedback ( id INT PRIMARY KEY AUTO_INCREMENT, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, voter_id INT NOT NULL, diff --git a/mysql/docker-entrypoint-initdb.d/02_data.sql b/mysql/docker-entrypoint-initdb.d/02_data.sql index 7ced5c51..d1b3957e 100644 --- a/mysql/docker-entrypoint-initdb.d/02_data.sql +++ b/mysql/docker-entrypoint-initdb.d/02_data.sql @@ -212,7 +212,7 @@ INSERT INTO playerdata.Labels (label) VALUES ('Zulrah_bot') ; -INSERT INTO PredictionFeedback (voter_id, subject_id, prediction, confidence, feedback_text, vote, proposed_label) +INSERT INTO PredictionsFeedback (voter_id, subject_id, prediction, confidence, feedback_text, vote, proposed_label) SELECT pl1.id AS voter_id, pl2.id AS subject_id, @@ -231,7 +231,7 @@ JOIN Predictions pr ON pr.id = pl2.id ORDER BY RAND(42) LIMIT 100; -UPDATE PredictionFeedback +UPDATE PredictionsFeedback SET proposed_label = prediction WHERE 1=1 AND vote = 1 diff --git a/src/core/database/models/feedback.py b/src/core/database/models/feedback.py index fe77e7fe..c6e1bdbc 100644 --- a/src/core/database/models/feedback.py +++ b/src/core/database/models/feedback.py @@ -13,7 +13,7 @@ class PredictionFeedback(Base): - __tablename__ = "PredictionFeedback" + __tablename__ = "PredictionsFeedback" id = Column(Integer, primary_key=True, autoincrement=True) ts = Column(TIMESTAMP, nullable=False, server_default="CURRENT_TIMESTAMP")