Storage and migration

storage.type | Where | When |
|---|---|---|
yaml (default) | plugins/FlareReferrals/data.yml | one server, nothing to set up |
sqlite | plugins/FlareReferrals/data/data.db | one server with many players |
mysql | MySQL or MariaDB | needed to link several servers |
The SQLite and MySQL / MariaDB drivers are already in Spigot and Paper.
storage:
type: mysql
mysql:
host: localhost
port: 3306
database: flarereferrals
username: root
password: ""
properties: "useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=utf8"
table-prefix: "fr_"
Create the database first. The plugin creates the tables (fr_meta, fr_players, fr_rewards, fr_events). On Pterodactyl: the server's Databases tab gives host, port, name, user and password.
Moving your data: /referrals migrate
- Put the settings of the new storage in
config.yml. Leavestorage.typeas it is. /referrals migrate <yaml|sqlite|mysql>: shows what it will copy, changes nothing.- Run the command it shows, ending with
confirm. Referrals and rewards pause, everything is copied. storage.typeis set for you. Restart the server.
The old data stays as a backup. If the new storage already has players the copy is refused (see merge, Network).
Safety
- A database set up by a newer FlareReferrals is never touched by an older one: the plugin stops and says so.
- If the database can't be reached at start, the plugin stays off: it never falls back to
data.yml, which would split your data. While running, a short database outage only means "can't be saved right now": nothing is saved half-way.
Last updated 25 October 2026