I am using EF 6.1 and I use code first approach with an existing database with data in a production environment.
Is it possible at all to migrate model changes and keep the existing customer`s data?
Yes, however, it can be complicated depending on specific case (on complexity of changes):
Overview: http://msdn.microsoft.com/en-us/library/dn579398.aspx#option1
Read this: http://msdn.microsoft.com/en-us/library/jj591621.aspx
And then this: http://msdn.microsoft.com/en-us/library/dn481501.aspx
来源:https://stackoverflow.com/questions/23415921/entity-framework-code-first-migration-keep-existing-data