From 8c82241e5f62fc9bec88a175a910a2b79452eff3 Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Mon, 30 Dec 2024 00:02:53 +0100 Subject: [PATCH] fix: make sure index is smaller than max length for mysql/maria --- Shoko.Server/Databases/MySQL.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Shoko.Server/Databases/MySQL.cs b/Shoko.Server/Databases/MySQL.cs index d0f56400d..3ee5ce02e 100644 --- a/Shoko.Server/Databases/MySQL.cs +++ b/Shoko.Server/Databases/MySQL.cs @@ -881,7 +881,8 @@ public class MySQL : BaseDatabase new(146, 15, "CREATE INDEX IX_TMDB_AlternateOrdering_Season_TmdbEpisodeGroupCollectionID ON TMDB_AlternateOrdering_Season(TmdbEpisodeGroupCollectionID);"), new(146, 16, "CREATE INDEX IX_TMDB_AlternateOrdering_Season_TmdbShowID ON TMDB_AlternateOrdering_Season(TmdbShowID);"), new(146, 17, "CREATE UNIQUE INDEX UIX_TMDB_AlternateOrdering_TmdbEpisodeGroupCollectionID ON TMDB_AlternateOrdering(TmdbEpisodeGroupCollectionID);"), - new(146, 18, "CREATE INDEX IX_TMDB_AlternateOrdering_TmdbEpisodeGroupCollectionID_TmdbShowID ON TMDB_AlternateOrdering(TmdbEpisodeGroupCollectionID, TmdbShowID);"), + // Index name max length is 64. + new(146, 18, "CREATE INDEX IX_TMDB_AlternateOrdering_TmdbEpisodeGroupCollection_TmdbShow ON TMDB_AlternateOrdering(TmdbEpisodeGroupCollectionID, TmdbShowID);"), new(146, 19, "CREATE INDEX IX_TMDB_AlternateOrdering_TmdbShowID ON TMDB_AlternateOrdering(TmdbShowID);"), new(146, 20, "CREATE UNIQUE INDEX UIX_TMDB_Collection_TmdbCollectionID ON TMDB_Collection(TmdbCollectionID);"), new(146, 21, "CREATE INDEX IX_TMDB_Collection_Movie_TmdbCollectionID ON TMDB_Collection_Movie(TmdbCollectionID);"),