Skip to content

Commit

Permalink
Maybe Fix Index Error on MySQL for Filters
Browse files Browse the repository at this point in the history
  • Loading branch information
da3dsoul committed Nov 12, 2023
1 parent 4ad65b8 commit 2a1a0f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Shoko.Server/Databases/MySQL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ public class MySQL : BaseDatabase<MySqlConnection>
new DatabaseCommand(119, 1,
"CREATE TABLE FilterPreset( FilterPresetID INT NOT NULL AUTO_INCREMENT, ParentFilterPresetID int, Name text NOT NULL, FilterType int NOT NULL, Locked bit NOT NULL, Hidden bit NOT NULL, ApplyAtSeriesLevel bit NOT NULL, Expression longtext, SortingExpression longtext, PRIMARY KEY (`FilterPresetID`) ); "),
new DatabaseCommand(119, 2,
"ALTER TABLE FilterPreset ADD INDEX IX_FilterPreset_ParentFilterPresetID (ParentFilterPresetID); ALTER TABLE FilterPreset ADD INDEX IX_FilterPreset_Name (Name); ALTER TABLE FilterPreset ADD INDEX IX_FilterPreset_FilterType (FilterType); ALTER TABLE FilterPreset ADD INDEX IX_FilterPreset_LockedHidden (Locked, Hidden);"),
"ALTER TABLE FilterPreset ADD INDEX IX_FilterPreset_ParentFilterPresetID (ParentFilterPresetID); ALTER TABLE FilterPreset ADD INDEX IX_FilterPreset_Name (Name(255)); ALTER TABLE FilterPreset ADD INDEX IX_FilterPreset_FilterType (FilterType); ALTER TABLE FilterPreset ADD INDEX IX_FilterPreset_LockedHidden (Locked, Hidden);"),
new DatabaseCommand(119, 3, "DELETE FROM GroupFilter WHERE FilterType = 2; DELETE FROM GroupFilter WHERE FilterType = 16;"),
new DatabaseCommand(119, 4, DatabaseFixes.MigrateGroupFilterToFilterPreset),
new DatabaseCommand(119, 5, DatabaseFixes.DropGroupFilter),
Expand Down

0 comments on commit 2a1a0f9

Please sign in to comment.