Skip to content

Database Schema

The current schema version is 12. The canonical minimal script for a fresh PostgreSQL installation is:

text
scripts/postgresql/init.sql

See Deployment for the script download, checksum, and execution instructions.

Existing databases apply each missing dialect migration in order. The schema 12 migrations are:

text
stores/jdbc/src/main/resources/com/firefly/store/jdbc/schema/migrations/h2/v12.sql
stores/jdbc/src/main/resources/com/firefly/store/jdbc/schema/migrations/postgresql/v12.sql
stores/jdbc/src/main/resources/com/firefly/store/jdbc/schema/migrations/mysql/v12.sql

Tables

TableResponsibility
firefly_schema_versionInstalled schema versions
firefly_cluster_metadataCluster invariants such as scheduler shard count
firefly_nodeServer node roles, registration, heartbeat, online state
firefly_shard_leaseScheduler shard ownership, lease, fencing token
firefly_executorLogical executor definitions
firefly_job_groupJob groups, default executor binding, metadata, enabled state
firefly_jobJob definitions, scheduling cursor, dispatch policy, shard id
firefly_executionParent execution attempt and aggregate status
firefly_execution_targetTarget execution records for unicast, broadcast, or shards
firefly_dispatch_outboxReliable dispatch queue, role routing, ACK timeout, retry state
firefly_executor_instance_locationGateway and session fencing for executor instances
firefly_audit_logAdmin change audit
firefly_job_historyJob create, enable/disable, and delete history
firefly_userAdmin users, PBKDF2 password digest, roles, first-login password state, and version
firefly_integration_keyPBKDF2 digest and rotation version of Integration Key

Initialization Modes

properties
firefly.jdbc.schema.mode=initialize-if-empty

For externally managed production migrations:

properties
firefly.jdbc.schema.mode=validate

initialize-if-empty checks the installed version and applies every missing incremental SQL file in order. validate checks only and does not modify the database; externally migrated databases must contain schema version 12.

Released under the Apache-2.0 License.