Add Database Diagram to Source Control? Add Database Diagram to Source Control? database database

Add Database Diagram to Source Control?


I've been allowed to publish my variation on a set of scripts that do just that, providing easy two-way import/export between files and diagrams stored in a database.

https://github.com/timabell/database-diagram-scm

Just run the batch file, pointing at your database of choice and you'll get a set of files, one for each diagram. Unfortunately the data is still binary, but it's a start.

It builds on what others have already done, definitely a shoulders of giants job. :-)


I don't know what the advantage of storing the diagram in source control would be. The database diagrams put an illustration to your database relationships which should be defined elsewhere. So long as you put the creation scripts for your DB in source safe, the diagram should render just fine when you create it and add your tables to it.