Xabaril / Esquio

Esquio is a Feature Toggle Library for .NET Developers.
Apache License 2.0
428 stars 49 forks source link

How can one setp the schema for the database #135

Closed gkfischer closed 4 years ago

gkfischer commented 4 years ago

In https://github.com/Xabaril/Esquio/issues/89 it is mentioned that the schema can be set by some option in V3, but I can't figure out how to do that. Could someone help me out here please?

unaizorrilla commented 4 years ago

Hi @gkfischer

In Esquio.UI.Host you can change the AddEntityFramework and use the overload to setup StoreOptions.

EsquioUIApiConfiguration.ConfigureServices(services)
                .AddEntityFramework(Configuration["ConnectionStrings:Esquio"], setup =>
                {
                    setup.DefaultSchema = "newschema";
                    setup.Features = new TableConfiguration("tablename");
                })

But, you need also to modify the migrations (remove and recreate), I try to improve this scenario because at this moment is not easy and require some interaction!

gkfischer commented 4 years ago

Thanks, I can manage with the migration update in the meantime