Visual Studio 2013 SQL Schema Compare: Ignore Column Order

*爱你&永不变心* 提交于 2019-12-05 11:31:43

问题


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:


回答1:


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.

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.

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

<IgnoreColumnOrder>True</IgnoreColumnOrder>

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 :)




回答2:


The 'Ignore column order' setting is not available in visual studio 2013. There are Tentive to reintroduce this option in the future.

Sources: Microsoft




回答3:


Ignore column order is now available in VS2015.

Additionally, for relational and Azure SQL databases SSDT 17.0 GA includes a highly requested improvement to ignore column order in upgrade plans as well as numerous other bug fixes. 

See: https://blogs.msdn.microsoft.com/ssdt/2017/04/19/announcing-the-general-availability-ga-release-of-ssdt-17-0-april-2017/



来源:https://stackoverflow.com/questions/21437024/visual-studio-2013-sql-schema-compare-ignore-column-order

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