Alter tts_models to add ratings counts

This commit is contained in:
Brandon Thomas committed 2023-01-26 01:12:20 -05:00
1 parent d190173f4d
commit e6d1f0db11
3 files changed
+28

No files matched your search

@@ -0,0 +1,7 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE tts_models DROP COLUMN user_ratings_total_count;
ALTER TABLE tts_models DROP COLUMN user_ratings_positive_count;
ALTER TABLE tts_models DROP COLUMN user_ratings_negative_count;
@@ -0,0 +1,16 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
-- Total count only includes "positive" and "negative" votes, not neutral ones.
ALTER TABLE tts_models
ADD COLUMN user_ratings_total_count INT(10) UNSIGNED NOT NULL DEFAULT 0
AFTER private_bucket_object_is_archive;
ALTER TABLE tts_models
ADD COLUMN user_ratings_positive_count INT(10) UNSIGNED NOT NULL DEFAULT 0
AFTER user_ratings_total_count;
ALTER TABLE tts_models
ADD COLUMN user_ratings_negative_count INT(10) UNSIGNED NOT NULL DEFAULT 0
AFTER user_ratings_positive_count;
@@ -162,6 +162,11 @@ CREATE TABLE tts_models (
-- calculated_total_ratings_submitted_count INT(10) NOT NULL DEFAULT 0,
-- calculated_total_uses_count BIGINT(10) NOT NULL DEFAULT 0,
-- Total count only includes "positive" and "negative" votes, not neutral ones.
user_ratings_total_count INT(10) UNSIGNED NOT NULL DEFAULT 0,
user_ratings_positive_count INT(10) UNSIGNED NOT NULL DEFAULT 0,
user_ratings_negative_count INT(10) UNSIGNED NOT NULL DEFAULT 0,
-- ========== MODERATION DETAILS ==========
-- Mods have to approve of tts models for them to show up in a public index.