Visual Studio 2013 SQL架构比较:忽略列顺序 [英] Visual Studio 2013 SQL Schema Compare: Ignore Column Order

查看:139
本文介绍了Visual Studio 2013 SQL架构比较:忽略列顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2013中,是否可以在进行架构比较时忽略列顺序?我看到此功能已从Visual Studio 2012中删除(据此: https://stackoverflow.com/a/13848952/188740 ),但我希望它会在2013版中重新出现.

In Visual Studio 2013, is there a way to ignore column ordering when doing a Schema Compare? I see that this feature was removed from Visual Studio 2012 (according to this: https://stackoverflow.com/a/13848952/188740), but I'm hoping it was brought back in version 2013.

以下是快速的视觉效果,以说明我要忽略的内容:

Here's a quick visual to illustrate what I'd like to ignore:

推荐答案

As described on this blog post, Ignore column order is now an option in SSDT version 17.0, which is compatible with Visual Studio 2015.

如果您曾经不得不处理意外数据 在表定义的中间放置一列时的运动, 您会发现这很难发现和管理.在此版本中 您现在可以检查高级"中的忽略列顺序"选项 发布选项.这会将新列追加到 现有表格,而不是更改表格结构以添加 列在其列出的位置.

If you’ve ever had to deal with accidental data motion when putting a column in the middle of a table definition, you’ll know how hard this can be to spot and manage. In this release you can now check the "Ignore Column Order" option in the Advanced Publish Options. This will append new columns to the end of an existing table rather than altering the table structure to add the column in its listed position.

可以通过进入发布配置文件的Advanced...按钮部分以及数据库项目属性的Debug选项卡的Advanced...按钮部分中找到设置.

You can find the setting by going into the Advanced... button section of your publish profile, as well as in the Advanced... button section of the database project properties' Debug tab.

您还可以通过将以下元素添加到publish.xml文件中来达到相同的效果:

You can also achieve the same effect by adding the following element to your publish.xml file:

<IgnoreColumnOrder>True</IgnoreColumnOrder>

不幸的是,我不知道在Visual Studio 2013中进行这项工作的方法,但是希望您现在已经升级到Visual Studio的较新版本:)

Unfortunately I do not know of a way to have this work in Visual Studio 2013, but hopefully you have upgraded to a newer version of Visual Studio by now :)

这篇关于Visual Studio 2013 SQL架构比较:忽略列顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆