Hi @MartinKr,
Liquibase is designed to handle both schema and data migrations, and it’s common to use them together in your projects. Here are some best practices and answers to your questions:
-
Mixing schema and data migration changesets: You can certainly mix schema and data migration changesets in a single changelog file. Just make sure to order them correctly, so the schema changes are applied before the data changes that depend on them. Interleaving the data migrations with their schema changes usually works best.
-
Timely migration for large amounts of data: Liquibase executes changesets in a synchronous manner, meaning it will wait for a changeset to complete before moving on to the next one. Usually this works well. If you run into database timeouts you can consider breaking down large data migration tasks into smaller, more manageable changesets. If you are dealing with a huge amount of data you could use an ETL tool triggered from Liquibase by using executeCommand.
PJ