Skip to main content
ug-core talks to MySQL or MariaDB through oxmysql, with prepared statements only.

Requirements

  • MySQL 8.0 or newer, or MariaDB 10.6 or newer. Older servers stop boot with Database: MySQL 8.0 or MariaDB 10.6+ is required, found MySQL 5.7.44.
  • mysql_connection_string set in server.cfg.
  • oxmysql started before ug-core.
If the database does not answer within 30 seconds, boot stops with Database: no connection after 30 s. Check oxmysql and mysql_connection_string.

Migrations

Each module creates and updates its own tables with versioned migrations. They run on boot, in version order, before the module loads. Applied versions are stored in ug_migrations:
MySQL commits table changes statement by statement. If a migration fails halfway, boot stops and the migration is not recorded. Fix the cause and restart: migrations use IF NOT EXISTS so they can run again.

Tables

Disabling a module never drops its tables.

Money is always traceable

Every balance change writes a ledger row in the same transaction: amount, balance after, reason and the other character for transfers. If the write fails, the change is undone.