Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm wanting to add a new migration in which i have removed a property of boolean 'IsRunIndividual" and added a property of int 'Type'.

In theory , I would like to run the code first migration , and when I do replace all true values with '1' and false with 0.

I know what you're thinking that is true and false. But these values could be 2 or 3 in the future. Also am i right in thinking the migration will delete this column (IsRunInd) as i have removed it from the model?

What are my options, and how would i get it so there is no column of IsRunIndividual and a new column (property) of Type. And then when seeding the new column it gets the values from the IsRun column.

Many Thanks
Posted
Comments
VICK 12-May-15 8:46am    
Add a new int type column. manually copy the data using query from old column.. and than delete the old column from model.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900