debug worker migrations for tts jobs and results

This will let us set jobs to run on "debug" worker nodes.
This commit is contained in:
Brandon Thomas committed 2022-06-24 22:40:12 -04:00
1 parent b9b8186e68
commit c5b04b51bc
4 files changed
+35 -2

No files matched your search

@@ -0,0 +1,10 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE tts_inference_jobs
DROP COLUMN is_debug_request;
ALTER TABLE tts_results
DROP COLUMN is_debug_request;
@@ -0,0 +1,14 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE tts_inference_jobs
ADD COLUMN is_debug_request BOOLEAN NOT NULL DEFAULT FALSE
AFTER raw_inference_text;
ALTER TABLE tts_inference_jobs
ADD INDEX index_is_debug_request (is_debug_request);
ALTER TABLE tts_results
ADD COLUMN is_debug_request BOOLEAN NOT NULL DEFAULT FALSE
AFTER is_for_twitch;
@@ -34,6 +34,11 @@ CREATE TABLE tts_inference_jobs (
-- The raw, unprocessed user input.
raw_inference_text TEXT NOT NULL,
-- ========== INFERENCE METADATA, DC, ROUTING, DEBUGGING ==========
-- If true, the request gets routed to a special "debug" worker.
is_debug_request BOOLEAN NOT NULL DEFAULT FALSE,
-- ========== CREATOR DETAILS ==========
-- Foreign key to user
@@ -115,6 +120,7 @@ CREATE TABLE tts_inference_jobs (
KEY fk_model_token (model_token),
KEY fk_maybe_creator_user_token (maybe_creator_user_token),
KEY index_status (status),
KEY index_creator_ip_address (creator_ip_address)
KEY index_creator_ip_address (creator_ip_address),
KEY index_is_debug_request (is_debug_request)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
@@ -77,7 +77,10 @@ CREATE TABLE tts_results (
is_from_api BOOLEAN NOT NULL DEFAULT FALSE,
is_for_twitch BOOLEAN NOT NULL DEFAULT FALSE,
-- ========== INFERENCE METADATA ==========
-- ========== INFERENCE METADATA, DC, ROUTING, DEBUGGING ==========
-- If true, the request was routed to a special "debug" worker.
is_debug_request BOOLEAN NOT NULL DEFAULT FALSE,
is_generated_on_prem BOOLEAN NOT NULL DEFAULT FALSE,
generated_by_worker VARCHAR(255) DEFAULT NULL,