EntityFrameworkCore-Demos icon indicating copy to clipboard operation
EntityFrameworkCore-Demos copied to clipboard

Noy able to create schema on a postgres database

Open Keerthikan opened this issue 5 years ago • 1 comments

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

Keerthikan avatar Aug 24 '20 14:08 Keerthikan

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?

PawelGerr avatar Aug 24 '20 15:08 PawelGerr