diff --git a/Plan/src/main/java/com/djrapitops/plan/database/tables/VersionTable.java b/Plan/src/main/java/com/djrapitops/plan/database/tables/VersionTable.java index 8bac7e4a9..88a822bbe 100644 --- a/Plan/src/main/java/com/djrapitops/plan/database/tables/VersionTable.java +++ b/Plan/src/main/java/com/djrapitops/plan/database/tables/VersionTable.java @@ -46,7 +46,7 @@ public class VersionTable extends Table { set = statement.executeQuery(); - return set.next(); + return !set.next(); } finally { endTransaction(statement); close(set, statement); diff --git a/Plan/test/test/java/main/java/com/djrapitops/plan/database/DatabaseCommitTest.java b/Plan/test/test/java/main/java/com/djrapitops/plan/database/DatabaseCommitTest.java index a4f31f97c..c7c802a37 100644 --- a/Plan/test/test/java/main/java/com/djrapitops/plan/database/DatabaseCommitTest.java +++ b/Plan/test/test/java/main/java/com/djrapitops/plan/database/DatabaseCommitTest.java @@ -3,6 +3,7 @@ package test.java.main.java.com.djrapitops.plan.database; import main.java.com.djrapitops.plan.Plan; import main.java.com.djrapitops.plan.data.TPS; import main.java.com.djrapitops.plan.data.WebUser; +import main.java.com.djrapitops.plan.database.databases.SQLDB; import main.java.com.djrapitops.plan.database.databases.SQLiteDB; import main.java.com.djrapitops.plan.utilities.MiscUtils; import main.java.com.djrapitops.plan.utilities.PassEncryptUtil; @@ -33,7 +34,7 @@ import static org.junit.Assert.assertTrue; public class DatabaseCommitTest { private Plan plan; - private SQLiteDB db; + private SQLDB db; private int rows; @Before