Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
StarWishsama committed Jan 14, 2025
2 parents 386bf8f + 3e68e4a commit 65aa5c6
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,14 @@ public void shutdown() {
}

public int getDatabaseVersion() {
return executeQuery("SELECT (" + FIELD_TABLE_VERSION + ") FROM "
+ (tableInformationTable == null ? TABLE_NAME_TABLE_INFORMATION : tableInformationTable))
.getFirst()
.getInt(FieldKey.TABLE_VERSION);
var query = executeQuery("SELECT (" + FIELD_TABLE_VERSION + ") FROM "
+ (tableInformationTable == null ? TABLE_NAME_TABLE_INFORMATION : tableInformationTable));

if (query.isEmpty()) {
return 0;
} else {
return query.getFirst().getInt(FieldKey.TABLE_VERSION);
}
}

@Override
Expand Down

0 comments on commit 65aa5c6

Please sign in to comment.