3

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?

4

1 回答 1

1

不是真的,我所做的最好的事情就是排除你不想要的东西,然后保存 SCMP 并将其添加到项目中。如果您将其他对象添加到该架构,尽管它们不会被排除(如果您查看 scmp,您可以看到排除是如何完成的)。

我个人发现使用模式比较是一种罕见的事情,最好(对我来说)自动部署到我的开发人员数据库并使用它来始终保持与项目同步,而不是部分部署项目。我的流程基本上是:

  • 在 SSDT 中编写代码
  • 将所有依赖项目推送到我的开发数据库
  • 测试
  • 报到
  • CI 系统构建和部署项目、测试等
  • CI 系统为其他环境构建脚本/部署

于 2015-12-01T08:52:55.340 回答