-
Notifications
You must be signed in to change notification settings - Fork 801
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
UI Storage providers - Tables custom prefix #481
Comments
If I remember correct, Hangfire uses it's own schema. Would that work here as well? |
@CarlosLanderas I like this idea would also be good to set the table schema, like @OskarKlintrot mentioned, hangfire does this - Could probably see how it's done in there repo - https://github.com/HangfireIO/Hangfire/search?q=DefaultSchema&unscoped_q=DefaultSchema |
Yes please. I was very confused when it created seemingly random tables, only two of which are prefixed with HealthCheck (which adds even more chaos). I had to find migration file in this repo to find out which tables to check/clear. Simple prefix would be enough for me, e.g. Ultimate solution is to move table names and schema to configuration, but that's not so important. |
Hello!. I think this is a important feature too, that's why I opened this thread. I'm currently implementing the ability to configure a custom schema. This will be included in 5.0.0 (not preview) Sample usage: .AddSqlServerStorage(cnnString, hcContextOptions => {
hcContextOptions.UseSchema("health");
//Migrations options removed from UI options and added in provider options
//hcContextOptions .DisableMigrations(true);
}); |
I've updated to 5.0.1 and the method isn't there. This is related to #647. |
Yes, the ability to set the schema would be great, as well as being able to set the migrations history table name and schema. Ideally, the ability to work work with an outside DBContext. I really like the way OpenIDDict does it by just having a .AddOpenIdDictEntities().
The way AspNetCore does it is also interesting by having an interface with DbSet to be added to any DbContext. My apps always have multiple dbcontexts for different domains and i have a bit of code that allows you to run the migrations for all of them, or run in a drop-create mode where i run the the generatedSQL for each context on an empty database. |
Hi, @CarlosLanderas Are you planning to add this feature soon? |
Hi @CarlosLanderas , Is it still planned to add extension for custom schema setup? |
I am on 6.0.5, and I do not see the ability to update the schema for all SqlServer.Storage tables. I can change the MigrationsHistory table, but that appears to be the only table that can be updated.
@CarlosLanderas Is still still a planned feature for all of the tables? |
Hi @CarlosLanderas ! |
fixed in #1858 |
I could be missing something here, but I don't see how #1858 addresses the original issue. I still don't see how we can change the table prefix or set a custom schema. So far, I only see an option to change the history table name/schema, but none of the others. Is there documentation somewhere for the new functionality? I'm not finding it by poking around with Intellisense, that's for sure. |
Any updates? |
Unfortunately no. I remember about that issue and track all activity in repo but I'm very limited in time to support project. I hope to return here some time later. |
I would like to throw a question for those users that are planning to use the new storage providers.
All storage packages run migrations by default against the database configured in the connection string and like tables before where created internally in sqlite it wasn't necessary to use table prefixes.
If someone wants to run migrations in a database that already has tables, it could be interesting being able to configure a prefix so instead of having a table called Configurations you could prefix it like Healthchecks_Configurations or UI_Configurations (whatever)
What do you think about this idea? Is something you might want/need to have in the public API surface?
Thanks!
The text was updated successfully, but these errors were encountered: