Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing SQL Server DB Schema at runtime (#802) #1814

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

denisekart
Copy link

Adds the ability to change the EF database context schema at runtime.

This can be achieved when configuring entity framework at startup

This is an example of how to configure separate schemas for both core and identity database context

options.UseEF<SQLServerDb>(db => db
    .UseSqlServer(connectionString)
    .UseCustomDatabaseSchema("not_dbo"));
options.UseIdentityWithSeed<IdentitySQLServerDb>(db => db
    .UseSqlServer(connectionString)
    .UseCustomDatabaseSchema("id"));

This feature works with any database provider that supports schemas.

This is not a complete solution since the design time schema changes were still not addressed (See discussion on piranha.core/issues/802).

@dnfadmin
Copy link

dnfadmin commented Jan 27, 2022

CLA assistant check
All CLA requirements met.

@tidyui
Copy link
Member

tidyui commented Feb 7, 2022

Just to clarify. These changes allow for Piranha to run against another schema, but it does not allow it to create the database in a different schema?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants