Database Project to Drop Database before deploy?

最后都变了- 提交于 2020-01-03 10:59:06

问题


Is it possible to get VS to drop the destination database before a deploy?

I've tried adding a post deploy script to the project, but it always comes back with active connections.


回答1:


You'll need to look up the Always recreate database option in the properties of the database project -> Deploy -> Deployment configuration file -> Edit Dialog.

Another option "Drop objects that exist in the target database but not in the schema" can also be useful to you.




回答2:


You should check the Always re-create database option under publish.

DB Project -> Right Click -> Publish -> Advanced



来源:https://stackoverflow.com/questions/3187204/database-project-to-drop-database-before-deploy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!