Remove all debug conditionals

- Add a down migrations comment
This commit is contained in:
Jordan Brown
2020-12-30 11:43:41 -05:00
parent 256e8f242f
commit 9cdaef0410
4 changed files with 9 additions and 15 deletions
@@ -369,27 +369,30 @@ namespace Tgstation.Server.Host.Database
return wasEmpty;
}
#if DEBUG
// HEY YOU
// IF YOU HAVE A TEST THAT'S CREATING ERRORS BECAUSE THESE VALUES AREN'T SET CORRECTLY THERE'S MORE TO FIXING IT THAN JUST UPDATING THEM
// IN THE FUNCTION BELOW YOU ALSO NEED TO CORRECTLY SET THE RIGHT MIGRATION TO DOWNLOAD TO FOR THE LAST TGS VERSION
// IF THIS BREAKS AGAIN I WILL PERSONALLY HAUNT YOUR ASS WHEN I DIE
/// <summary>
/// Used by unit tests to remind us to setup the correct MSSQL migration downgrades.
/// </summary>
public static readonly Type MSLatestMigration = typeof(MSAddSwarmIdentifer);
internal static readonly Type MSLatestMigration = typeof(MSAddSwarmIdentifer);
/// <summary>
/// Used by unit tests to remind us to setup the correct MYSQL migration downgrades.
/// </summary>
public static readonly Type MYLatestMigration = typeof(MYAddSwarmIdentifer);
internal static readonly Type MYLatestMigration = typeof(MYAddSwarmIdentifer);
/// <summary>
/// Used by unit tests to remind us to setup the correct PostgresSQL migration downgrades.
/// </summary>
public static readonly Type PGLatestMigration = typeof(PGAddSwarmIdentifer);
internal static readonly Type PGLatestMigration = typeof(PGAddSwarmIdentifer);
/// <summary>
/// Used by unit tests to remind us to setup the correct SQLite migration downgrades.
/// </summary>
public static readonly Type SLLatestMigration = typeof(SLAddSwarmIdentifer);
#endif
internal static readonly Type SLLatestMigration = typeof(SLAddSwarmIdentifer);
/// <inheritdoc />
#pragma warning disable CA1502 // Cyclomatic complexity
@@ -105,11 +105,6 @@
<ProjectReference Include="..\Tgstation.Server.Api\Tgstation.Server.Api.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Compile Remove="Database\Design\**\*" />
<None Include="Database\Design\**\*" />
</ItemGroup>
<ItemGroup>
<Content Remove="ClientApp\package-lock.json" />
<Content Remove="ClientApp\package.json" />
@@ -330,7 +330,6 @@ namespace Tgstation.Server.Tests
}
}
#if DEBUG
[TestMethod]
public async Task TestDownMigrations()
{
@@ -475,7 +474,6 @@ namespace Tgstation.Server.Tests
await migrator.MigrateAsync(migrationName, default);
await context.Database.EnsureDeletedAsync();
}
#endif
[TestMethod]
public async Task TestServer()
@@ -146,7 +146,6 @@ namespace Tgstation.Server.Tests
Assert.IsNotNull(line);
}
#if DEBUG
[TestMethod]
public void TestDowngradeMigrations()
{
@@ -201,6 +200,5 @@ namespace Tgstation.Server.Tests
Assert.AreEqual(latestMigrationPG, DatabaseContext.PGLatestMigration);
Assert.AreEqual(latestMigrationSL, DatabaseContext.SLLatestMigration);
}
#endif
}
}