Only migrate database on production gameserver

This commit is contained in:
jvyden 2022-06-10 02:24:26 -04:00
commit caa4b9bec1
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -53,7 +53,9 @@ public static class StartupTasks
if (!dbConnected) Environment.Exit(1);
using Database database = new();
Logger.Info("Migrating database...", LogArea.Database);
#if !DEBUG
if(serverType == ServerType.GameServer)
#endif
migrateDatabase(database);
if (ServerConfiguration.Instance.InfluxDB.InfluxEnabled)
@ -116,6 +118,7 @@ public static class StartupTasks
private static void migrateDatabase(Database database)
{
Logger.Info("Migrating database...", LogArea.Database);
Stopwatch totalStopwatch = new();
Stopwatch stopwatch = new();
totalStopwatch.Start();