Skip to content
This repository was archived by the owner on May 27, 2024. It is now read-only.

Configuration | SQL Database

GamerCoder edited this page Apr 27, 2023 · 2 revisions

In v1.7.1, Novaconomy now allows storage to be stored in a SQL Database.

As of v1.7.1, the following drivers/services are supported:

mysql (MySQL)
postgresql (PostreSQL)
oracle (Oracle)
sqlite (SQLite File) 

Enabling SQL Database

In your config.yml:

Database:
  # Set this value to 'true'
  Enabled: true

Logging in to SQL Database

The following information should be put in your config.yml:

Database:
  # The hostname to your SQL Database Instance.
  Host: "localhost"

  # The port to your SQL Database Instance.
  # Most SQL Driver Instances default to the port '3306'
  Port: 3306

  # The name of the Database you are logging into.
  # For SQLite, this is the path to your DB File.
  Database: "novaconomy"

  # The Username login for your Database Instance.
  Username: "GamerCoder"

  # The Password login for your Database Instance.
  Password: "MyDatabasePassword1234"

Database-File Conversion

Novaconomy has a built-in feature to automatically convert data stored from Disk Storage to your Database Instance and vice-versa.

In your config.yml:

Database:
  # Turned on by Default
  Convert: true

Prerequisites

File-To-Database

File-To-Database conversion will automatically delete files stored on the Disk Storage after successfully converting them to a Database. When using unstable or experimental versions of the plugin, backups are HIGHLY recommended.

This requires the SQL Database feature to be enabled with a proper host, port, driver, and login information. Any present matching table information on the Database will be combined with the information from the Disk Storage.

Database-To-File

Database-To-File conversion will not automatically delete files stored on the SQL Instance after successfully converting them to Disk Storage.

This feature will automatically run on start-up regardless if the Database feature is enabled. This means that proper host, port, driver, and login information must be present in order for it to properly succeed.

Clone this wiki locally