diff --git a/_migrations/2022-08-10-055529_alter_table_tts_models_add_vocoder/down.sql b/_migrations/2022-08-10-055529_alter_table_tts_models_add_vocoder/down.sql new file mode 100644 index 0000000000..a37b7208ed --- /dev/null +++ b/_migrations/2022-08-10-055529_alter_table_tts_models_add_vocoder/down.sql @@ -0,0 +1,7 @@ +-- noinspection SqlDialectInspectionForFile +-- noinspection SqlNoDataSourceInspectionForFile +-- noinspection SqlResolveForFile + +DROP INDEX `fk_maybe_custom_vocoder_token` ON `tts_models`; + +ALTER TABLE tts_models DROP COLUMN maybe_custom_vocoder_token; diff --git a/_migrations/2022-08-10-055529_alter_table_tts_models_add_vocoder/up.sql b/_migrations/2022-08-10-055529_alter_table_tts_models_add_vocoder/up.sql new file mode 100644 index 0000000000..79dad50a69 --- /dev/null +++ b/_migrations/2022-08-10-055529_alter_table_tts_models_add_vocoder/up.sql @@ -0,0 +1,11 @@ +-- noinspection SqlDialectInspectionForFile +-- noinspection SqlNoDataSourceInspectionForFile +-- noinspection SqlResolveForFile + +-- If set, we'll use a custom vocoder (from table vocoder_models) instead of a default vocoder. +-- If not set, we'll use `maybe_default_pretrained_vocoder` (or the website default). +ALTER TABLE tts_models +ADD COLUMN maybe_custom_vocoder_token VARCHAR(32) DEFAULT NULL + AFTER maybe_default_pretrained_vocoder; + +CREATE INDEX `fk_maybe_custom_vocoder_token` ON `tts_models` (`maybe_custom_vocoder_token`); diff --git a/_migrations_squashed/tts_tables/tts_models.sql b/_migrations_squashed/tts_tables/tts_models.sql index 04b55aca2a..acaaa5f122 100644 --- a/_migrations_squashed/tts_tables/tts_models.sql +++ b/_migrations_squashed/tts_tables/tts_models.sql @@ -53,6 +53,10 @@ CREATE TABLE tts_models ( -- If not set, use the website default. (Currently HifiGan-SS) maybe_default_pretrained_vocoder VARCHAR(64) DEFAULT NULL, + -- If set, we'll use a custom vocoder (from table vocoder_models) instead of a default vocoder. + -- If not set, we'll use `maybe_default_pretrained_vocoder` (or the website default). + maybe_custom_vocoder_token VARCHAR(32) DEFAULT NULL, + -- Optional Pointer to a newer version of the voice -- If there's a newer version, we can disable this one. -- maybe_updated_model_token VARCHAR(32) DEFAULT NULL, @@ -201,6 +205,7 @@ CREATE TABLE tts_models ( UNIQUE KEY (token), KEY fk_creator_user_token (creator_user_token), KEY fk_maybe_mod_user_token (maybe_mod_user_token), + KEY fk_maybe_custom_vocoder_token (maybe_custom_vocoder_token), KEY index_creator_ip_address_creation (creator_ip_address_creation), KEY index_creator_ip_address_last_update (creator_ip_address_last_update), KEY index_creator_set_visibility (creator_set_visibility),