Skip to content

Deploy changes to the database in production

Daniel Matos edited this page Feb 5, 2023 · 2 revisions

To avoid issues when making changes to the data model, Hibernate will only validate the schema of the database.

In order to perform the desired changes, we use Flyway to version the schemas. Due to an issue in Quarkus, the backend cannot perform the migrations itself, because it uses the reactive datasource and Flyway needs a JDBC one.

The steps to migrate are the following:

  1. Copy the migration file to the server
scp <migration file> <host>:.
  1. Edit the file to make it a transaction. Add BEGIN TRANSACTION at the beginning and then COMMIT at the end

  2. Perform the migration using MySQL client

mysql -u <user> -p safilo < <migration file>
Clone this wiki locally