Skip to content

Commit 435ea51

Browse files
committed
Fix SQLite detection is MigrationManager
1 parent 617330f commit 435ea51

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/main/java/com/github/games647/fastlogin/core/storage/MigrationManager.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ protected MigrationManager(FastLoginCore<?, ?, ?> core, HikariDataSource dataSou
6262
protected void createTables() throws SQLException {
6363
try (Connection con = dataSource.getConnection();
6464
Statement createStmt = con.createStatement()) {
65-
if (dataSource.getDriverClassName().contains("sqlite")) {
65+
66+
// if (dataSource.getDriverClassName().contains("sqlite")) {
67+
// throws: the return value of "fastlogin.hikari.HikariDataSource.getDriverClassName()" is null
68+
if (core.getStorage() instanceof SQLiteStorage) {
6669
createStmt.executeUpdate(CREATE_TABLE_STMT.replace("AUTO_INCREMENT", "AUTOINCREMENT"));
6770
} else {
6871
createStmt.executeUpdate(CREATE_TABLE_STMT);

0 commit comments

Comments
 (0)