Clone
3
Database Backends
Patrick Gniza edited this page 2026-08-17 10:48:39 +02:00

Deutsch | English

Database Backends

Romexis supports multiple database backends. This Docker project currently treats Microsoft SQL Server as the default backend and Firebird as a parallel backend through a dedicated Compose override.


Compose Backend Selection

The database backend is selected in .env with DATABASE_BACKEND and COMPOSE_FILE.

Microsoft SQL Server

DATABASE_BACKEND=mssql
COMPOSE_PATH_SEPARATOR=:
COMPOSE_FILE=docker-compose.yml:docker-compose.${DATABASE_BACKEND}.yml

Firebird

DATABASE_BACKEND=firebird
COMPOSE_PATH_SEPARATOR=:
COMPOSE_FILE=docker-compose.yml:docker-compose.${DATABASE_BACKEND}.yml

The backend-specific Compose override sets the actual Romexis backend variables.


Backend Identifiers

Romexis itself still uses SERVER_DB internally.

SERVER_DB Backend
5 Microsoft SQL Server
4 Firebird

For normal operation, do not set SERVER_DB manually in the base .env unless you are debugging. Let the backend-specific Compose override set it.


Backend Services

MSSQL

The MSSQL override starts the mssql service and configures Romexis to connect to:

mssql:1433

Typical values:

MSSQL_SA_PASSWORD=Pwr0mex!s!!!
ROMEXIS_DB_NAME=Romexis_db
ROMEXIS_DB_USER=romexis
ROMEXIS_DB_PASSWORD=romexis

Firebird

The Firebird override starts the firebird service and configures Romexis to connect through Jaybird.

Typical values:

FIREBIRD_USER=sysdba
FIREBIRD_PASSWORD=pwr0mex!
FIREBIRD_DB_PATH=/firebird/data/romexis.fdb

Initialization Scripts

The initialization entry point is:

/opt/init-romexis-db.sh

This script routes to:

/opt/init-romexis-mssql-db.sh
/opt/init-romexis-firebird-db.sh

Version-Aware Initialization

The backend scripts read:

/opt/romexis/version

Example:

6.5.3.444.203

They resolve the target schema marker using the explicit Romexis update order.

Example:

6.5.3 -> 653
6.5.2 -> 652
6.5.1 -> 651
6.4.x -> 64
3.8.3 -> 383

The scripts do not rely on plain numeric order because Romexis update markers do not sort naturally.


Maximum Schema Version

Use:

ROMEXIS_DB_MAX_VERSION=653

If the Romexis version is newer than the configured maximum marker, initialization continues only up to the max marker and prints a warning.


Existing Databases

If the database already appears initialized, initialization is skipped.

For MSSQL, this is based on database and user presence.

For Firebird, this is based on the presence of core Romexis tables.

Future upgrade logic can be added by reading the existing database schema marker.