model refinements

This commit is contained in:
Brandon Thomas committed 2021-05-20 20:12:17 -04:00
1 parent 173102f1d8
commit 23cdeaddf6
2 files changed
+29 -11

No files matched your search

@@ -22,10 +22,9 @@ CREATE TABLE tts_model_upload_jobs (
) NOT NULL DEFAULT 'public',
-- The name of the voice
voice_name VARCHAR(255) NOT NULL,
-- The voice actor (in the case of cartoon characters)
voice_actor_name VARCHAR(255) DEFAULT NULL,
-- The "name" of the voice model, which might be complicated.
-- If maybe_subject_token (etc.) is set, then it's authoritative instead.
title VARCHAR(255) NOT NULL,
-- NB: DO NOT CHANGE ORDER; APPEND ONLY!
-- THIS MUST MATCH THE RESPECTIVE JOBS TABLE.
@@ -48,7 +47,7 @@ CREATE TABLE tts_model_upload_jobs (
'not-set',
'google-drive',
'web'
) NOT NULL DEFAULT 'not-set',
) NOT NULL DEFAULT 'not-set',
-- Jobs begin as "pending", then transition to other states.
--
@@ -106,17 +105,29 @@ CREATE TABLE w2l_template_upload_jobs (
-- Wide enough for IPv4/6
creator_ip_address VARCHAR(40) NOT NULL,
-- Users can upload their own private templates.
-- They can choose to make them public later.
-- NB: Not sure I'm going to use this at first (or at all); would be separate from mod approval.
is_private_for_creator BOOLEAN NOT NULL DEFAULT FALSE,
-- (THIS MIGHT NOT BE USED)
-- NB: DO NOT SORT!
-- THIS MUST MATCH THE RESPECTIVE JOBS TABLE.
creator_set_visibility ENUM(
'public',
'hidden',
'private'
) NOT NULL DEFAULT 'public',
-- The title of the template
title VARCHAR(255) NOT NULL,
-- NB: DO NOT SORT!
-- THIS MUST MATCH THE RESPECTIVE JOBS TABLE.
template_type ENUM(
'not-set',
'video',
'image'
) NOT NULL,
) NOT NULL DEFAULT 'not-set',
-- Can be linked to a well-known subject
maybe_subject_token VARCHAR(32) DEFAULT NULL,
maybe_actor_subject_token VARCHAR(32) DEFAULT NULL,
-- If we need to download the file from Google Drive.
download_url VARCHAR(512) DEFAULT NULL,
@@ -126,7 +137,7 @@ CREATE TABLE w2l_template_upload_jobs (
'not-set',
'google-drive',
'web'
) NOT NULL DEFAULT 'not-set',
) NOT NULL DEFAULT 'not-set',
-- Jobs begin as "pending", then transition to other states.
--
@@ -166,6 +177,8 @@ CREATE TABLE w2l_template_upload_jobs (
-- INDICES --
PRIMARY KEY (id),
KEY fk_creator_user_token (creator_user_token),
KEY fk_maybe_subject_token (maybe_subject_token),
KEY fk_maybe_actor_subject_token (maybe_actor_subject_token),
KEY index_status (status),
KEY index_creator_ip_address (creator_ip_address)
@@ -131,6 +131,9 @@ CREATE TABLE w2l_templates (
'video'
) NOT NULL DEFAULT 'not-set',
-- Mods have to approve of w2l templates.
is_mod_approved BOOLEAN NOT NULL DEFAULT FALSE,
-- Optional Pointer to a newer version of the template
-- If there's a newer version, we can disable this one.
maybe_updated_template_token VARCHAR(32) DEFAULT NULL,
@@ -192,6 +195,7 @@ CREATE TABLE w2l_templates (
calculated_total_uses_count BIGINT(10) NOT NULL DEFAULT 0,
-- In this case, a moderator disables it.
-- This also disables it for the creator.
is_mod_disabled BOOLEAN NOT NULL DEFAULT FALSE,
-- If a moderator has comments.
@@ -204,6 +208,7 @@ CREATE TABLE w2l_templates (
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-- If this is removed by a mod.
-- It shows up nowhere if deleted.
deleted_at TIMESTAMP NULL,
-- INDICES --