VSTS数据库架构比较不保存注释

发布于 2024-07-30 04:30:47 字数 1148 浏览 8 评论 0原文

我们使用安装了 SP1 和 GDR R2 的 VSTS 2008。

发现下一个问题:

  1. 2个相同的数据库(例如 数据库1和数据库2);
  2. Database1 是一个工作数据库, Database2 是生产数据库;
  3. 添加一个新的存储过程 带有注释的数据库1 (CREATE PROCEDURE 语句之前的描述、作者等);
  4. 尝试比较方案 数据库1(源)和数据库2 (目标); 新SP成功 添加到 Database2,但在 CREATE PROCEDURE 语句上方没有注释(但 SP 主体中的注释被完全保留)。

Database1中的存储过程部分:

-- =============================================
-- Author:      [author here]
-- Create date: [creation date here]
-- Description: [description here]
-- =============================================
CREATE PROCEDURE [schema here].[procedure name here] 
    @param1 uniqueidentifier,
    @param2 nvarchar(64),
    @param3 bit,
    @param4 int = 1,
    @param5 int = 25,
    @param6 int = 0 output,
    @param7 int = 0 output
AS

数据库2中模式比较后的结果:

CREATE PROCEDURE [schema here].[procedure name here]
@param1 UNIQUEIDENTIFIER, @param2 NVARCHAR (64), @param3 BIT, @param4 INT=1, @param5 INT=25, @param6 INT=0 OUTPUT, @param7 INT=0 OUTPUT
AS

它谋杀了注释。 模式比较选项中的复选标记... -> 忽略评论 未选中。

有什么办法可以让这个工作吗?

We use VSTS 2008 with SP1 and GDR R2 installed.

Found the next problem:

  1. 2 identical databases (for example
    Database1 and Database2);
  2. Database1 is a working database,
    Database2 is a production one;
  3. adding a new stored procedure to the
    Database1 with comments
    (description, author etc. before the CREATE PROCEDURE statement);
  4. trying to compare schemes on
    Database1 (source) and Database2
    (target); the new SP successfully
    added to the Database2 but without comment above the CREATE PROCEDURE statement (but comments in the SP body are fully preserved).

The part of the stored procedure in Database1:

-- =============================================
-- Author:      [author here]
-- Create date: [creation date here]
-- Description: [description here]
-- =============================================
CREATE PROCEDURE [schema here].[procedure name here] 
    @param1 uniqueidentifier,
    @param2 nvarchar(64),
    @param3 bit,
    @param4 int = 1,
    @param5 int = 25,
    @param6 int = 0 output,
    @param7 int = 0 output
AS

The result in Database2 after schema comparison:

CREATE PROCEDURE [schema here].[procedure name here]
@param1 UNIQUEIDENTIFIER, @param2 NVARCHAR (64), @param3 BIT, @param4 INT=1, @param5 INT=25, @param6 INT=0 OUTPUT, @param7 INT=0 OUTPUT
AS

It murdered comments.
The check mark in the Schema compare options... -> Ignore Comments is unchecked.

Is there any way to make this work?

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

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

发布评论

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

评论(1

拥抱我好吗 2024-08-06 04:30:47

I remembered having read something about this a while ago, and after a little digging I found this blog post by Gert Drapers, a.k.a. The Datadude, which describes your exact problem. He says that it is a known problem and that the team is working on a fix. The post dates back to before the GDR2 was released, so I guess they haven't fixed it yet since you still have this problem.

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