Reputation: 10335
During development we did such things as create table, drop index, etc in our migrations (let say we have over hundreds migrations file). Now I want to deploy on production server, could I create simplified migration like in 1 file to summary all of the changes on my development ?
to clarify I give example : migrations 1 - create table student migrations 2 - rename student_name to student_full_name migrations 3 - rename address to student_address
now I want to have a better migration file like when we create student table we already have correct field name (student with field student_full_name and student_address)
how to do that in dotnet ef core 2.1 ?
Upvotes: 0
Views: 80
Reputation: 18178
I would try the following ( after backing up ) take note of the version number in the migrations table in the production database delete all the migrations older than that from the code set the connection string to the production database add a migration.
Upvotes: 1