mirror of
https://github.com/BlockWorldGroup/Ledger-Databases.git
synced 2025-08-17 11:39:43 +08:00
Fix SQLite and H2 file paths
This commit is contained in:
parent
9f1f12318d
commit
a8844600d3
@ -8,7 +8,7 @@ import kotlin.io.path.pathString
|
||||
|
||||
object H2Database : LedgerDatabase {
|
||||
override fun getDataSource(savePath: Path): DataSource = JdbcDataSource().apply {
|
||||
setURL("jdbc:h2:${savePath.pathString};MODE=MySQL")
|
||||
setURL("jdbc:h2:${savePath.resolve("ledger.h2").pathString};MODE=MySQL")
|
||||
}
|
||||
|
||||
override fun getDatabaseIdentifier() = LedgerDatabases.identifier("h2")
|
||||
|
@ -7,7 +7,7 @@ import kotlin.io.path.pathString
|
||||
|
||||
object SQLite : LedgerDatabase {
|
||||
override fun getDataSource(savePath: Path) = SQLiteDataSource().apply {
|
||||
url = "jdbc:sqlite:${savePath.pathString}"
|
||||
url = "jdbc:sqlite:${savePath.resolve("ledger.sqlite").pathString}"
|
||||
}
|
||||
|
||||
override fun getDatabaseIdentifier() = Ledger.identifier(Ledger.DEFAULT_DATABASE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user