https://github.com/quiltservertools/ledger-databases
Adds support for MySQL and H2 databases to Ledger
https://github.com/quiltservertools/ledger-databases
Last synced: about 1 year ago
JSON representation
Adds support for MySQL and H2 databases to Ledger
- Host: GitHub
- URL: https://github.com/quiltservertools/ledger-databases
- Owner: QuiltServerTools
- License: lgpl-3.0
- Created: 2021-09-15T19:52:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-27T20:38:30.000Z (almost 2 years ago)
- Last Synced: 2025-04-03T15:43:48.130Z (about 1 year ago)
- Language: Kotlin
- Size: 103 KB
- Stars: 8
- Watchers: 0
- Forks: 9
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ledger Databases
Adds support for MySQL, MariaDB, H2, and PostgreSQL databases in Ledger
## Use
## Common
For both MySQL, MariaDB, H2, and PostgreSQL, you will need to place Ledger Databases in your mods folder along with Ledger 1.1.0 or newer
## H2
Add the following to the bottom of your Ledger config file:
```toml
[database_extensions]
database = "H2"
```
## MySQL
Add the following to the bottom of your Ledger config file:
```toml
[database_extensions]
database = "MYSQL"
url = ""
username = ""
password = ""
properties = []
maxPoolSize = 10
connectionTimeout = 60000
```
`url`: Must be URL of database with `/` appended. An example URL would be `localhost/ledger`. You can optionally add port information such as `localhost:3000/ledger`
## MariaDB
Add the following to the bottom of your Ledger config file:
```toml
[database_extensions]
database = "MARIADB"
url = ""
username = ""
password = ""
properties = []
maxPoolSize = 10
connectionTimeout = 60000
```
`url`: Must be URL of database with `/` appended. An example URL would be `localhost/ledger`. You can optionally add port information such as `localhost:3000/ledger`
## PostgreSQL
```toml
[database_extensions]
database = "POSTGRESQL"
url = ""
username = ""
password = ""
properties = []
maxPoolSize = 10
connectionTimeout = 60000
```
## SQLite
```toml
[database_extensions]
database = "SQLITE"
```
## Connector properties
For some databases, such as MySQL, you can provide properties to the database connector. For each property, add a string entry to the `properties` array.
```toml
properties = ["useJDBCCompliantTimezoneShift=true", "useLegacyDatetimeCode=false", "serverTimezone=UTC"]
```