EntityFrameworkCore-Demos
EntityFrameworkCore-Demos copied to clipboard
Noy able to create schema on a postgres database
I am trying make use of this demo to migrate to an postgres databse, but for some reason is ef core not able to create the schema, and simce it does not exist it is not able to migrate to that particular schema. Does this way of changing schemas also work for postgres databases?
https://stackoverflow.com/questions/63429975/dbcontext-not-able-to-migrate-because-schema-does-not-exist
In my demos I'm using SQL Server and EF Core for SQL Server is creating the schema automatically when the table __EFMigrationsHistory is created. Postgres might behave differently.
Btw, the pasted code on stackoverflow has UseSqlServer in it. Did you change it to UseNpgsql in your code?