Enable sqlite WAL journal_mode

Related #1670
This commit is contained in:
AsamK 2025-01-14 22:35:45 +01:00
parent 74c2604dc8
commit e11e093020

View file

@ -95,7 +95,7 @@ public abstract class Database implements AutoCloseable {
sqliteConfig.setTransactionMode(SQLiteConfig.TransactionMode.IMMEDIATE);
HikariConfig config = new HikariConfig();
config.setJdbcUrl("jdbc:sqlite:" + databaseFile + "?foreign_keys=ON");
config.setJdbcUrl("jdbc:sqlite:" + databaseFile + "?foreign_keys=ON&journal_mode=wal");
config.setDataSourceProperties(sqliteConfig.toProperties());
config.setMinimumIdle(1);
return new HikariDataSource(config);