I'm legit losing my mind

This commit is contained in:
NovaFox161
2021-01-31 13:48:25 -06:00
parent 5e0879aa46
commit 73379399eb
@@ -14,6 +14,7 @@ import org.dreamexposure.discal.server.utils.Authentication;
import org.dreamexposure.novautils.database.DatabaseInfo;
import org.dreamexposure.novautils.database.DatabaseSettings;
import org.flywaydb.core.Flyway;
import org.flywaydb.core.api.exception.FlywayValidateException;
import org.flywaydb.core.internal.command.DbMigrate;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -131,6 +132,11 @@ public class DisCalServer {
org.dreamexposure.novautils.database.DatabaseManager.disconnectFromMySQL(info);
LogFeed.log(LogObject.forDebug("Migrations Successful", sm + " migrations applied!"));
} catch (FlywayValidateException e) {
LogFeed.log(LogObject.forException("Migrations failure (validate)", e, DisCalServer.class));
e.printStackTrace();
System.out.println("Migration Error Message: " + e.getErrorCode());
System.exit(3);
} catch (DbMigrate.FlywayMigrateException e) {
LogFeed.log(LogObject.forException("Migrations failure", e, DisCalServer.class));
e.printStackTrace();