Recently we started using Liquibase. It didn't occurred yet but we imagined what would happen if two developers commits changes in the change log file to the shared Git repository.
How to solve or avoid a merge conflict? To broaden this question some what:
What is the recommended workflow using Liquibase in combination with Git?
Example scenario:
- Michael changes a column in table 'customer'.
- Jacob changes a column in table 'account'.
So both developers added a <changeSet> to the same changelog file changelog.xml.
EDIT :
As commented the scenario isn't that much exciting indeed. Assume Jacob was the last one to push his code. He has to pull first. Gets a warning there are merge conflicts to solve. He solves the conflict by keeping both parts of the code, that of Michael's and his. Updating the database with Liquibase gives no problems.
Advanced example scenario:
-Michael changes the name of column 'name' of table 'customer' in 'first_name', commits and pushes.
-Jacob changes the name of column 'name' of table 'customer' in 'last_name' and commits.
-Jacob gets a merge conflict when pulling Michael's code.
-Jacob and Michael discussed the conflict and agreed it has to be 'last_name', which Jacob commits and pushes.
-Michael pulls the solved conflict and runs a Liquibase update. He gets an error: column "name" does not exist