dotnet ef migration list not finding migrations in Migration folder

.net .net-core entity-framework-core f#

Question

I was following this tutorial (On linux and converted to F#) Migrations were created successfully (3 files in the Migrations directory.) But dotnet ef database update says everything is up to date and dotnet ef migrations list says no migrations found. When I check the created sqlite file manually it contains only an empty __EFMigrationsHistory table.

The context.Database.Migrate() and context.Database.EnsureCreated() methods also don't pick up any migrations.

I'm thinking maybe my fsproject is missing reference to the Migrations folder but I'm not sure what a reference to that would look like.

Thanks for you help!

1
3
3/28/2018 9:17:43 AM

Popular Answer

Here is what I did to get migrations working.

  1. I had to also convert the generated migration files to F#. This blog post by Ody Mbegbu was very helpful here. (Although some modifications have to be made to account for changes since v1.)
  2. I had to add the newly converted .fs migration files to the fsproj.
0
3/29/2018 9:29:23 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow