-
Notifications
You must be signed in to change notification settings - Fork 0
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:
- Copy the migration file to the server
scp <migration file> <host>:.
-
Edit the file to make it a transaction. Add
BEGIN TRANSACTION
at the beginning and thenCOMMIT
at the end -
Perform the migration using MySQL client
mysql -u <user> -p safilo < <migration file>