❔ How to handle migration with column changes in Ef Core code first?
I need to change a table which is already in production.
Specifically I need to change a field which is currently an integer which represents a week number.
I now need to change it to a proper datatime.
Ideally I would like to do something like this:
Specifically I need to change a field which is currently an integer which represents a week number.
I now need to change it to a proper datatime.
Ideally I would like to do something like this:
- Add a new column to the table - StartDate
- Add some code to the migration Up file which runs through all the instances of that table and reads the StartWeek column and writes to the StartDate
- Remove the StartWeek column