OF-3237: Add exploratory Firebird database support#3240
OF-3237: Add exploratory Firebird database support#3240guusdk wants to merge 1 commit intoigniterealtime:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds exploratory Firebird database support to Openfire, including schema assets and CI validation to evaluate feasibility of treating Firebird as a supported backend.
Changes:
- Bundle the Jaybird JDBC driver and add Firebird detection / test SQL logic.
- Add Firebird install + upgrade SQL scripts and expose Firebird as a setup wizard preset.
- Extend CI with a Firebird Docker Compose service and install/upgrade workflow jobs; update database documentation.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| xmppserver/src/main/webapp/setup/setup-datasource-standard.jsp | Adds a Firebird JDBC preset to the setup wizard. |
| xmppserver/src/main/java/org/jivesoftware/database/DbConnectionManager.java | Detects Firebird and adds Firebird-specific test SQL plus enum value. |
| xmppserver/pom.xml | Bundles the Jaybird JDBC driver in the server build. |
| documentation/database.html | Documents Firebird usage (driver + connection URL + setup steps). |
| distribution/src/database/upgrade/38/openfire_firebird.sql | Adds Firebird-specific v38 upgrade script for CI upgrade coverage. |
| distribution/src/database/openfire_firebird.sql | Adds Firebird installation schema (adapted from PostgreSQL). |
| build/ci/updater/src/main/java/com/igniterealtime/openfire/updaterunner/Main.java | Updates example JDBC URL list used by the CI updater runner. |
| build/ci/updater/pom.xml | Bundles Jaybird in the CI updater runner. |
| build/ci/compose/firebird.yml | Adds Firebird service definition for CI (container + healthcheck + volume). |
| .github/workflows/continuous-integration-workflow.yml | Adds Firebird install/upgrade jobs and gates publishing on them. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f9396f9 to
46891d1
Compare
This is an exploratory change to assess the feasibility of adding Firebird (https://firebirdsql.org) as a supported database back-end for Openfire. Firebird is an open-source relational database with standard SQL support, backed by the mature Jaybird JDBC driver. The change bundles that driver, adds Firebird to the database-type detection logic, provides an installation schema (adapted from the PostgreSQL schema, with Firebird-compatible types), a schema upgrade script for version 38, a Docker Compose service definition for CI, install and upgrade CI jobs, a preset in the setup wizard, and a section in the database documentation.
46891d1 to
4612d31
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| path: ~/.m2/repository/org/igniterealtime/openfire/ | ||
| - name: Set environment variables | ||
| run: | | ||
| echo "CONNECTION_STRING=jdbc:firebirdsql://localhost:3050//var/lib/firebird/data/openfire.fdb" >> $GITHUB_ENV |
There was a problem hiding this comment.
For ease of use, if you add FIREBIRD_CONF_DatabaseAccess: Restrict /var/lib/firebird/data in your docker compose file, you can also use only the filename instead of the full path, i.e. jdbc:firebirdsql://localhost:3050/openfire.fdb
(NB: prefix jdbc:firebird: is also supported, and port (:3050) is already the default)
| @@ -0,0 +1,441 @@ | |||
| -- In Firebird, TEXT is represented as BLOB SUB_TYPE TEXT CHARACTER SET UTF8. | |||
There was a problem hiding this comment.
If it makes it easier, you could also define a domain called TEXT:
create domain TEXT as blob sub_type text character set UTF8;|
|
||
| CREATE TABLE ofUser | ||
| ( | ||
| username VARCHAR(64) NOT NULL, |
There was a problem hiding this comment.
Defining VARCHAR or CHAR without specifying a character set will mean its actual character set depends on the database default.
I recommend that you specify the actual desired character set so you don't get surprises later on, or when supporting customers with a different character set (or even NONE) as the default.
This is an exploratory change to assess the feasibility of adding Firebird (https://firebirdsql.org) as a supported database back-end for Openfire.
Firebird is an open-source relational database with standard SQL support, backed by the mature Jaybird JDBC driver. The change bundles that driver, adds Firebird to the database-type detection logic, provides an installation schema (adapted from the PostgreSQL schema, with Firebird-compatible types), a schema upgrade script for version 38 (to be able to run a database upgrade job in CI), a Docker Compose service definition for CI, install and upgrade CI jobs, a preset in the setup wizard, and a section in the database documentation.