I'm looking to have Visual Studio's SQL Schema Compare generate the delta SQL to update a production database, including a column rename on a table with system versioning on (temporal table).
Using refactoring within Visual Studio SQL Project will indeed create an entry in the refactorlog file, and will generate the correct sp_rename SQL for that renamed field. However, the associated history table doesn't get the field renamed - it does a drop and add, which will not work well once there is actual data in the table. Plus it also makes it so the tables get out of sync with each other.
Maybe I could modify the refactorlog XML to indicate it is a field with a history table attached? the XML below shows the Elementtype is "SqlSimpleColumn". Are there any other options I could explore?
System: Visual Studio Community 2017 SQL server: Azure SQL Database V12
<Operation Name="Rename Refactor" Key="48b6ef58-988b-48bf-9606-4048b0c51bf2" ChangeDateTime="04/03/2017 21:19:32">
<Property Name="ElementName" Value="[dbo].[xyz2].[newafterreset]" />
<Property Name="ElementType" Value="SqlSimpleColumn" />
<Property Name="ParentElementName" Value="[dbo].[xyz2]" />
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="[updateafterreset]" />
</Operation>