views:

294

answers:

2

DB Designer had a lot of bugs but one outstanding feature was that database models were saved in plain XML by default.

This allowed a user to diff file versions via SVN or Beyond Compare, easily finding any changes made to the database.

Unfortunately, DB Designer's succsssor, MySQL Workbench, stores files in a proprietary MVW file format, which is unreadable.

Is it possible to force MySQL Workbench to save as XML?

+2  A: 

No, the current version (5.2.10 beta) does not support that.

However, the file format is not proprietary - its a simple zip archive. It contains a single XML document which is the complete database model. I wrote this SO question a couple of months ago with the same goal as you seem to have. I wanted to be able to do svn diff model.mwb

The answer I got there helped me write a small script which unzipped the file before passing it to the diff tool. It worked decently and if you're interested I can post it somewhere.

I also very recently started a thread on the Workbench forum about this issue. Hopefully someone on the development team can provide some more input on this.

Oskar
If it is being zipped purely to keep file sizes down, it shouldn't be too hard to add this as a configurable setting?
Jon Winstanley
A: 

Yes, you can use any software compressor as: 7-zip, lzarc, winrar (I have not tested), file manager (on linux, but I do not know what it is called in English, I speak Spanish XD ), ... etc. Select open compressed, unzip the xml file, edit what you want to reopen your mdw file with the compressor and replace your xml file. So you need not know which compression algorithm used. This technique can be used with any similar format. As openoffice formats.

kihass
Thanks for your answer. However I specifically would like to know if the program will ever save to XML drectly, rather than having to unzip the file each time.
Jon Winstanley