Database
PostgreSQL holds what must survive a restart. The schema is created and migrated by Liquibase
(common/src/main/resources/db/changelog/), when enableLiquibase (game server) or createStructure (proxy) is on.
players
| Column | Type | What it is |
|---|---|---|
id | uuid | The player's id (primary key). |
name | varchar(25) | Their name (indexed, to find a player by name). |
data | jsonb | Their profile data: settings and what the modules store, each under its own key. |
permissions | jsonb | Their groups (with duration) and own permissions. |
created_at | timestamptz | First join. |
lock | varchar(255) | SERVER_ID of the server that owns the profile, or empty. |
lock_expires_at | timestamptz | When that lock lapses unless renewed. |
player_groups
| Column | Type | What it is |
|---|---|---|
id | uuid | The group's id. |
name | varchar(30) | Its name. |
priority | integer | The lowest one is a player's main group. |
prefix, suffix | varchar(50) | Shown around the player's name. |
permissions | jsonb | Its permissions. |
created_at | timestamptz |
player_vault
Numeric counters (currencies, statistics), one row per player and key, changed atomically in the database rather than through the profile.
| Column | Type | What it is |
|---|---|---|
player_id | uuid | The player. |
key | varchar(255) | What is counted. |
value | numeric | The amount. |
Redis
Redis holds only what can be lost: who is online, on which server and type of server, with entries that expire on their own.