Skip to content

Commit

Permalink
fix: missing table name when using sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
StarWishsama committed Jan 14, 2025
1 parent 9f1b1e1 commit 825d300
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.xzavier0722.mc.plugin.slimefun4.storage.adapter.sqlcommon;

import static com.xzavier0722.mc.plugin.slimefun4.storage.adapter.sqlcommon.SqlConstants.FIELD_TABLE_VERSION;
import static com.xzavier0722.mc.plugin.slimefun4.storage.adapter.sqlcommon.SqlConstants.TABLE_NAME_TABLE_INFORMATION;

import city.norain.slimefun4.timings.entry.SQLEntry;
import com.xzavier0722.mc.plugin.slimefun4.storage.adapter.IDataSourceAdapter;
Expand Down Expand Up @@ -95,7 +96,7 @@ public void shutdown() {
}

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

0 comments on commit 825d300

Please sign in to comment.