diff --git a/src/Tgstation.Server.Host/Database/DatabaseContext.cs b/src/Tgstation.Server.Host/Database/DatabaseContext.cs index bc22c30c95..fe296f825a 100644 --- a/src/Tgstation.Server.Host/Database/DatabaseContext.cs +++ b/src/Tgstation.Server.Host/Database/DatabaseContext.cs @@ -348,30 +348,12 @@ namespace Tgstation.Server.Host.Database if (version < new Version(4, 0)) throw new ArgumentOutOfRangeException(nameof(version), version, "Not a valid V4 version!"); - string targetMigration = null; - // Update this with new migrations as they are made - // Always use the MS class - if (version < new Version(4, 0, 2)) - { - // Special handling because this is where SQLite was introduced - if (DatabaseType == DatabaseType.Sqlite) - throw new NotSupportedException("Cannot migrate below version 4.0.2.0 while using Sqlite!"); - - targetMigration = nameof(MSReattachCompileJobRequired); - } - - // Uncomment once next migration/version step happens - /* - else if (version < new Version(V_NEXT_MIGRATION)) - { - // Special handling because this is where SQLite was introduced - if (DatabaseType == DatabaseType.Sqlite) - targetMigration = nameof(SLAddSqlite); - - targetMigration = nameof(V_NEXT_LAST_MIGRATION); - } - */ + string targetMigration = null; + if (version < new Version(4, 1, 0)) + throw new NotSupportedException("Cannot migrate below version 4.1.0!"); + else if (version < new Version(4, 2, 0)) + targetMigration = DatabaseType == DatabaseType.Sqlite ? nameof(SLRebuild) : nameof(MSFixCascadingDelete); if (targetMigration == null) {