Documentation/FirebirdMigration

Migration HSQLDB → Firebird
As a first step towards sunsetting embedded HSQLdb support LibreOffice 6.1 includes an auto migration function to convert existing HSQLdb Base files to Firebird Base files.

Why
With version 6.1 support for a Firebird database embedded in a Base file moves from an experimental feature to a standard feature of LibreOffice. With this version the embedded Firebird database becomes the default for new Base files, while continuing to support embedded HSQLdb Base files. In a future version support for embedded HSQLdb data will be retired.

How
An auto migration function is started whenever a Base file, with an embedded HSQLdb database, is opened and the first connection to the data schema is created.

A dialog box will give you the option to either forego the migration at this time by selecting 'Later' or to begin the process by selecting 'Now'.

Schema tables, views, relationships and data are automatically transferred into a new embedded Firebird database in the current file.

The Firebird 3.0 database engine supports a different collection of available field data types from HSQLdb. During transfer of the schema information field data type definitions are altered as required.

Note The Firebird 3.0 engine imposes a constraint of 30 characters for schema identifiers such as Tables, Views and Field names while HSQLdb supported much longer identifiers. Where an existing schema identifier exceeds this limit the migration will alter the names. Details on automatic name change to follow

Reference information on differences between the HSQLdb and Firebird 3.0 database engines
Note Base uses a rather old (v1.8x), and tweaked, version of the HSQLdb embedded database engine. Tables below included HSQLdb info for the Base embedded engine.

Base 6.1 uses the Firebird 3.0 embedded engine which offers, along with data access performance increases and file size savings, a more expansive set of standard functions available for use in your SQL select statements beyond the scope of this wiki page. Firebird project documentation available at https://www.firebirdsql.org/en/reference-manuals/

Data engine standard functions
First column shows functions of HSQLDB, which aren't available in Firebird. Second column will show functions, which will work in HSQLDB and Firebird with the same result. Third column show functions of Firebird, which must be chosen instead of functions in HSQLDB. This functions give the same result as the functions in the same row for HSQLDB, but aren't available with this name of the function in HSQLDB.