Ledger Databases
This mod extends Ledger's functionality by adding support for various database management systems for storing game data.
Supported Databases
The mod allows using MySQL, PostgreSQL, H2, and SQLite as alternative data storage solutions for Ledger.
Installation and Configuration
To use this mod, you need to install both Ledger Databases and the main Ledger version 1.1.0 or newer in your mods folder.
H2 Configuration
Add the following code to the end of your Ledger configuration file:
[database_extensions]
database = "H2"
MySQL Configuration
MySQL requires more detailed configuration:
[database_extensions]
database = "MYSQL"
url = ""
username = ""
password = ""
properties = []
maxPoolSize = 10
connectionTimeout = 60000
URL parameter: must contain the database address with /database_name appended. For example: localhost/ledger. You can specify a port: localhost:3000/ledger.
PostgreSQL Configuration
PostgreSQL configuration is similar to MySQL:
[database_extensions]
database = "POSTGRESQL"
url = ""
username = ""
password = ""
properties = []
maxPoolSize = 10
connectionTimeout = 60000
SQLite Configuration
For SQLite, minimal configuration is sufficient:
[database_extensions]
database = "SQLITE"
Additional Connection Properties
Some databases, such as MySQL, allow setting additional connection properties. Add string values to the properties array:
properties = ["useJDBCCompliantTimezoneShift=true", "useLegacyDatetimeCode=false", "serverTimezone=UTC"]