Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 database edition schema compare where target is dbproj

I'm using visual studio 2010 database edition and running a schema compare against a SQL database instance to sync up new objects on the database which arent yet in my project (dbproj). My solution contains many projects some of which reference each other via database references. When I write updated from my schema compare to my target project any references to objects in my other projects get added as hard references and do not use the sqlcmd variables that get set up when adding a database references.

This causes my solution to have warnings and errors until I manually swap out the hard references for the sqlcmd variables. I've found I can re-make the database references which has an option to pick up all the hard references through the project but this is still cumbersome. Is there a way to use the existing set of sqlCmd variables defined for my project such that updated are written to my project with the variable references used?

like image 418
Dav Evans Avatar asked Jul 22 '10 22:07

Dav Evans


1 Answers

This is just a thought but we never make direct changes in the database and use our project to build against the db to produce a deploy script. By using the project as the master of all knowledge we feel this works very well for us.

We branch out to create our dev, test environments then merge the project when we deploy.

As for references, we found referencing the dbmeta file instead of the actual database was also useful as it makes all the projects more transferable.

like image 53
Barry King Avatar answered Nov 12 '22 12:11

Barry King