migrations to add language tags to models

This commit is contained in:
Brandon Thomas committed 2024-09-29 00:54:12 -04:00
1 parent a8766e9620
commit 9bfd0330a9
5 files changed
+44

No files matched your search

@@ -0,0 +1,5 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE model_weights DROP COLUMN maybe_ietf_language_tag;
@@ -0,0 +1,9 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE model_weights
ADD COLUMN
maybe_ietf_language_tag VARCHAR(64) DEFAULT NULL
AFTER maybe_description_rendered_html;
@@ -0,0 +1,5 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE model_weights DROP COLUMN maybe_ietf_primary_language_subtag;
@@ -0,0 +1,9 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE model_weights
ADD COLUMN
maybe_ietf_primary_language_subtag VARCHAR(12) DEFAULT NULL
AFTER maybe_ietf_language_tag;
@@ -53,6 +53,22 @@ CREATE TABLE model_weights (
-- models don't deserve a description).
maybe_description_rendered_html TEXT DEFAULT NULL,
-- OPTIONAL. Only for TTS and Voice Conversion models.
-- The full IETF BCP47 language tag (eg. en, en-US, es-419, ja-JP, pt, etc.)
-- (Not that it matters apart from categorization, since voice conversion is universal.)
-- NB: There's another set of tables (model_weights_extension_voice_conversion_details, etc.) that
-- may have older post-migration data for some models. We'll want to backfill this field from there
-- and then make this one authoritative.
maybe_ietf_language_tag VARCHAR(64) DEFAULT NULL,
-- OPTIONAL. Only for TTS and Voice Conversion models.
-- The IETF BCP47 language tag's primary language subtag (eg. "es-419" becomes "es")
-- (Not that it matters apart from categorization, since voice conversion is universal.)
-- NB: There's another set of tables (model_weights_extension_voice_conversion_details, etc.) that
-- may have older post-migration data for some models. We'll want to backfill this field from there
-- and then make this one authoritative.
maybe_ietf_primary_language_subtag VARCHAR(12) DEFAULT NULL,
-- ========== CREATOR DETAILS ==========