TFS Database Projects - Renaming of an Existing table column is there a setting to preserve the data?

Answered TFS Database Projects - Renaming of an Existing table column is there a setting to preserve the data?

  • Friday, March 01, 2013 5:40 AM
     
     

    Hi all,

    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?

    Kind regards,

    Matt

All Replies