Forum Stats

  • 3,750,278 Users
  • 2,250,153 Discussions
  • 7,866,895 Comments

Discussions

How to configure EFCore so it creates a schema (user with no login priviledges)?

Mike N
Mike N Member Posts: 16 Green Ribbon
edited Nov 11, 2019 3:24AM in Oracle Providers for ASP.NET

We're using schemas to separate the tables in the database. I'd like to from EF Core manage such tables.

I found a call `modelBuilder.HasDefaultSchema`, which seems to be applying the schema on all tables but the migration history, which is created under the login user (which is not too good, as different applications access the different parts of the database, and different users can release the same application). But if the user is not created upfront, the migration fails.

So, is it possible to instruct Oracle via EF Core to create the said schema/user?

And a bonus question - can one move the migration history table inside a schema?

Thanks.

Tagged: