VS2010 DB 项目 - 将存储过程移动到另一个模式

发布于 2024-09-27 03:01:08 字数 215 浏览 1 评论 0原文

我有一个使用 VS2010 数据库项目的源代码控制数据库。我正在尝试将一些存储过程从 [dbo] 架构移动到另一个架构。当我更改项目中的架构名称(移动到文件夹结构并编辑 CREATE 以指示新架构)并部署时,我最终会在新架构中为过程创建一个 CREATE,但在旧模式。据我所知,旧模式中没有保存该过程的依赖项(如果有的话,我希望它无论如何都指向新模式中的过程)。

这是VS的bug,还是我做错了什么?

I've got a database under source control using a VS2010 database project. I'm trying to move some stored procs from the [dbo] schema to another schema. When I change the schema name in the project (moved in folder structure plus edited the CREATE to indicate the new schema) and deploy, I end up with a CREATE for the proc in the new schema, but no corresponding DROP for the proc in the old schema. To the best of my knowledge, there's no dependency holding that proc in the old schema (and if there were, I'd want it to point to the proc in the new schema anyway).

Is this a VS bug, or am I doing something wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别挽留 2024-10-04 03:01:08

数据库项目、部署选项卡、部署配置中有一个选项:

为对象生成 DROP 语句
位于目标数据库中,但是
不在数据库项目中

,如果您检查它,它应该删除旧的存储过程

There is an option in the Database Project, Deploy tab, Deployment configuration:

Generate DROP statements for objects
that are in the target database but
that are not in the database project

if you check that, it should drop the old sproc

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文