Fix a exception being thrown and crashing the server
This commit is contained in:
parent
bd15d1f244
commit
0d735ec2e8
2 changed files with 3 additions and 2 deletions
|
@ -53,7 +53,7 @@ mod_name=Zontreck's Library Mod
|
||||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=GPLv3
|
mod_license=GPLv3
|
||||||
# The mod version. See https://semver.org/
|
# The mod version. See https://semver.org/
|
||||||
mod_version=1201.13.043024.1512
|
mod_version=1201.13.043024.1524
|
||||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||||
# This should match the base package used for the mod sources.
|
# This should match the base package used for the mod sources.
|
||||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class DatabaseMigrations
|
||||||
try {
|
try {
|
||||||
DatabaseWrapper.get().executePreparedStatement(pstmt);
|
DatabaseWrapper.get().executePreparedStatement(pstmt);
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
throw new RuntimeException(e);
|
LibZontreck.LOGGER.warn("There was a problem executing a migration. The migration is " + pstmt+"\n\nThis does not necessarily mean a failure. If everything seems to work fine, this migration might not have been necessary.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,6 +159,7 @@ public class DatabaseMigrations
|
||||||
Migration lastTableChecked = null;
|
Migration lastTableChecked = null;
|
||||||
for(Migration m : migrations)
|
for(Migration m : migrations)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(lastTableChecked == null) lastTableChecked = getCurrentTable(m.tableID);
|
if(lastTableChecked == null) lastTableChecked = getCurrentTable(m.tableID);
|
||||||
else {
|
else {
|
||||||
if(lastTableChecked.tableID != m.tableID) lastTableChecked = getCurrentTable(m.tableID);
|
if(lastTableChecked.tableID != m.tableID) lastTableChecked = getCurrentTable(m.tableID);
|
||||||
|
|
Reference in a new issue