Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup schema compare file so that it always ignores a specific db schema?

I have two SSDT projects targeting the same database. When I use Schema Compare feature from any of the projects, it detects the other project's objects as being non-existent and sets them for deletion.

I cannot merge the two projects into one as I make use of the DAC API and there's a point where I need one compiled before the other. The "dependent" project's objects are all in the same db schema (let's call it myschema), which is unknown from the "core" project.

Is there any way I can setup the SCMP file so that when comparing the "core" project it ignores everything that's placed inside myschema?

like image 817
Crono Avatar asked Dec 13 '25 20:12

Crono


1 Answers

Not really, the best that I have done is to exclude the things you don't want and then save the SCMP and add it to the project. If you add other objects to that schema though they won't be excluded (if you look in the scmp you can see how the exclusions are done).

I personally find that using the schema compare is a rare thing, it is better (for me) to automate the deployment to my developer database and use that to always keep it in sync with the projects rather than part deploying projects. My process is basically:

  • Write code in SSDT
  • Push all dependent projects to my dev database
  • Test
  • Check-in
  • CI system builds and deploys projects, tests etc
  • CI system builds scripts for other environments / deploys

ed

like image 162
Ed Elliott Avatar answered Dec 15 '25 13:12

Ed Elliott



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!