Gravy
Gravy

Reputation: 12465

EF 5 - Model First, How to update DB Schema without dropping database

I am developing in MVC 4, EF 5.0

Model First development - how do I 'easily' get the DB schema to update, without having to drop the database / erase any data?

e.g. I have a Customer table. In this table, we capture name, surname, email address. I now want to collect the telephone number, so I change the model and get EF to update the database schema.

Visual studio 2012 referrs me to http://go.microsoft.com/fwlink/?LinkId=238269, however this looks like chinese to me.

They talk about running an NUGET package called code first migrations. Does this functionality not come packaged automatically with VS2012?

Thanks

Upvotes: 6

Views: 8460

Answers (1)

Piotr Perak
Piotr Perak

Reputation: 11118

Database migrations is what you are looking for. Both automatic and specified in code - http://msdn.microsoft.com/pl-PL/data/jj591621

Upvotes: 3

Related Questions