Description:
Currently, merging .mwb files under version control does not work, as the files are binary. Some workarounds have been suggested by the community which tend to include manually unzipping the .mwb file and merging the .xml file inside, but this is error prone and is not desirable.
How to repeat:
- Create a .mwb and commit it to source control (e.g. to a Git repository).
- Create a branch and make some changes to the .mwb
- Also make some changes to it on the master branch.
- Attempt to merge the changes from the branch to the master branch.
Git fails to merge the two models, as it cannot handle the binary file.
Suggested fix:
MySQL Workbench already contains functionality for merging models, via the 'Synchronize' and 'Synchronize With Any Source' options.
The suggested fix for this would be a command line option which launches MySQL Workbench in "Merge Mode". This mode would read the two .mwb files specified as parameters by Git and launch directly into the Synchronize flow, using the two versions of the model as the Source and Destination. The user would then manually complete the last steps of the Synchronize workflow to check that the models have been synchronized.
Once this has been completed, the merged model would then be saved and MySQL Workbench would close, allowing Git to complete the merge.