Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Database Diagram to Source Control?

Is there any way to add a SQL Server Database Diagram to source control? I can't seem to find a way to script it out of the database. If so, is there a way to get that diagram into a Visual Studio Database Project for easy deployment?

like image 990
Brian Avatar asked May 21 '09 21:05

Brian


2 Answers

to script it to a file try:

http://www.codeproject.com/KB/database/ScriptDiagram2005.aspx

I would not do this.

like image 73
KM. Avatar answered Oct 17 '22 09:10

KM.


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. :-)

like image 25
Tim Abell Avatar answered Oct 17 '22 09:10

Tim Abell