Skip to content

Toro Cloud Dev Center

Migrating core database connections

Creating the required core databases1 and exposing them to Martini via database connections are some of the tasks Martini automatically executes when it's first started for fast and easy set up. However, these databases run on HSQL (embedded mode) and are not ideal for production environments in Martini because file operations2 can be resource-intensive and embedded HSQL databases are limited to serving one client at a time. Thus, it is recommend to migrate to databases that are more reliable.

Table creation

Depending on the Hibernate configuration, Martini may or may not automatically create the core databases' tables for you. Although, by default, it should. Check the value of the hibernate.ddl-auto property and read up on how the value of this property affects your database schemas here.

Performing actual database migration will not be covered in this page as the process will most likely vary depending on the database(s) you are migrating to. Instead, this page will go through the steps you need to do on Martini's side.

  1. Stop the database connection of the database you are migrating.
  2. Take note of the new database's connection details and update the affected database connection's fields accordingly.
  3. Ensure that Martini can connect to your database by testing your updated database connection. Martini will not start if it cannot communicate with all of the core databases.
  4. Save the changes.
  5. Lastly, restart Martini.

Just updates the database connection; doesn't migrate data

Following the steps above will update your database's connection details but won't migrate the data in your old database to the new one.

  1. Namely coder, tracker, config, and flux

  2. Martini uses the disk-based implementation of HSQLDB.