I have an ASP.NET MVC EF code first project. I copied it and made another project from it. I didn't change any of the namespaces or project names. I copied the existing DB and made a copy with a different name. Code first migrations work fine in the original project. In the new copied project they only pickup changes to existing models like adding new fields or changing field names. If I try to add a new model class, Add-Migration
doesn't pick up that change.
I've tried this but it didn't work. I tried this and it didn't work.
I've tried to delete the migration history folder and dbo._MigrationHistory table data and recreate migrations using Enable-Migrations
. I've tried to delete existing migrations in the migration folder and create another initial migration using Add-Migration Initial -IgnoreChanges
then update-database
. Then add my changes. None of this worked.