Is it possible to merge all migrations files into one ?
I created initial migration.
dotnet ef migrations add InitialMigration
EF 6.X has a option
IgnoreChanges.That is the perfect fit for your scenario. But unfortunately it is not with the EF core.
But you have a workaround.
Step 1 : Delete all the migration scripts on the Migrations folder.
Step 2 : On package manager console : run
PM> Add-Migration InitialCreate
Step 3 : Delete both
Down() methods code.Before do that keep those methods content separately for future use.
Step 4 : run:
It'll insert a new record into
Step 5 : After that fill the above migration script's (i.e.
Down() method from the content which you have keep on the safe place on Step 3.
That is it.Now you have only 1 migration file :)
Note : EF core with Package manager console (PM) :Package Manager Console