TFS Database Projects - Renaming of an Existing table column is there a setting to preserve the data?
Friday, March 01, 2013 5:40 AM
I am in the process of Trialing and Evaluating the benefits of using TFS 2010 Database projects and just a quick one.
Within management studio if i rename a column through the designer I am able to "generate script" which preserves the data of the column
you are renaming via copying into a temp table etc.
Within TFS Database project it looks like the default behavior is that it will purely rename the column but this clears the data?
Question - I read here http://msdn.microsoft.com/en-us/library/aa833165.aspx quote
"When you use refactoring to rename a database object or to move a database object to another schema, the refactoring log file records that action. At deployment time, the information in the log file helps preserve the intent of your changes. For example, you might lose data if you renamed a table, because the table would be dropped and a table would be created with the new name. With the refactoring log file, the deployment script can instead rename the table, preserving your intent and your data."
is this saying that if i refactor a table change after i do it in the schemea that TFS will remember the change i have made and seek to preserve the data when it does its schema compare?
Monday, March 04, 2013 9:03 AMModerator
As my understanding, your opinion is correct.
As it said that “at deployment time, the information in the log file helps preserve the intent of your changes”.
When you use refactoring to rename or move a database object, the ProjectName.refactorlog file is updated with the details of that operation.
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Edited by Jack Zhai - MSFTMicrosoft Contingent Staff, Moderator Wednesday, March 13, 2013 2:46 AM
- Marked As Answer by Jack Zhai - MSFTMicrosoft Contingent Staff, Moderator Wednesday, March 13, 2013 9:59 AM