mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 16:39:21 +01:00
Add heartbeat backwards migration
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user