Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do Visual Studio Database Project *.refactorlog Files Belong in Source Control?

I am using git (via GitHub for Windows) and I am using the latest .gitignore for Visual Studio from GitHub

I notice that my <ProjectName>.refactorlog files are being included in my commits.

Do .refactorlog files belong in source control?

like image 526
qxotk Avatar asked Feb 07 '14 19:02

qxotk


1 Answers

The .refactorlog should be in source control if you intend to move database objects across schemas.

See: MSDN: Move a Database Object to a Different Schema

Relevant section: Preserving Your Intent With The Refactoring Log

When you move a database object to a different schema, an entry is added to the refactoring log for your database project. When you deploy your changes, this log helps ensure that the corresponding object in the target environment is renamed as you intended. Otherwise, the existing object would be dropped, and an object would be added with the new name. The log is maintained in an XML file that is named ProjectName.refactorlog. You check this file in to version control when you check in the other files that compose your database project. The ProjectName.refactorlog file contains only information about refactoring operations that require special handling during deployment.

like image 115
Shiva Avatar answered Sep 19 '22 09:09

Shiva