Currently, our local builds include a database build & deploy step that deploys databases to the developers’ local machines based on a database model contained within a Sql Server 2008 Database Project. This is fine for deploying the database schema, but is unable to deploy any database diagrams that have been defined.
In order to deploy the diagrams, we are currently having to include CREATE scripts for the sysdiagrams table and the stored procedures upon which the designer is dependent, and a data insert script for the diagram definitions, as part of the post deployment stage.
Is there a better way to deploy the sysdiagrams table and stored procedures? These are created within sql server management studio when clicking yes in the dialog that asks whether I’d like to create the support objects for diagramming – does this invoke something that I can hook into? I can’t find a relevant stored procedure.
There isn’t a means of doing this and you should bear in mind that Database diagram format differs between releases of SQL Server thus a SQL2008 diagram can’t be directlt inserted into a SQL 2000 database. The diagram is storede as a binary file within the database.
You could carry on doing what you’re currently doing or have a lokk at the tool on this link.
NOTE: I have no connection to the site and so can’t vouch for it, but it may give you some ideas.