-
Notifications
You must be signed in to change notification settings - Fork 866
Enable schema changes in a non breaking way (IdentitySchemaOptions?) #1208
Comments
I was just using the flags as an example, the idea is over time we'd continue to add to this option to keep enabling additional schemas (or we could just use a version instead and increment it along with our major versions instead of trying to do it by feature, maybe that's easier. IdentitySchemaVersions enum (v1.0, v2.0, v2.1 etc) Does that sound reasonable? |
Version might be reasonable and simpler. @divega? |
There's still a greater problem here though, this doesn't really work with how the manager expects to interact with stores, as its using whether the stores implement a particular interface or not to determine if methods should throw or not... |
I think this is why we eventually gave up on non breaking schema changes before |
Ok I think I have something that will work
Thoughts? |
Ah, ok, I misread -- so you are. So why not just rev this library differently and let people know it's a schema change on new versions? More flags seem like adding crazy complexity. |
@HaoK Sounds reasonable. @javiercn and @danroth27: does the overload of AddEntityFrameworkStores work for you to switch this on in the templates? |
Also, this auth_time claim is not something needed to be stored in the DB -- it'd a claim that's issued for the current cookie to indicate the time at which the user authenticated (meaning provided proof of identity). |
@brockallen no all of the things discussed here are Identity.EntityFrameworkCore specific things. None of these are concerns for core identity |
Right, I caught that after I commented. I updated my comment after. |
We will need to decide what the existing AddEntityFrameworkStores() that doesn't specify a version does... does that always mean latest? Or does that always mean 1.0? |
@brockallen we've seen a significant amount of friction historically from migrations, so forcing migrations on upgrade is something we've learned to try to avoid (and make it opt in for existing users), but on by default in templates that need the new functionality. |
@HaoK It has to mean 1.0 or it will still be breaking for existing applications. But we should update the templates to use the latest so new applications will get all the latest features by default. |
Should we add something like AddEntityFrameworkCoreLatest() to always mean latest then? |
Templates wouldn't use this, but I still imagine its useful to be able to consistently ask for the latest always (migrations and all) |
@HaoK Create an issue for it--it's not urgent, but agree it could be useful. |
Well, I can just add it as part of this PR, we'd want to use this overload for most of the tests anyways |
sounds like unnecessary complexity. you know the old phrase "complexity is the enemy of security", right? oh well, we'll see how it turns out. |
Something like this in the EntityFrameworkCore package:
We'd consume this in the DbContext options. We still would need to rationalize this with enabling the manager functionality, as the managers won't be able to check these options (it uses interface implementations on the store today)
Needed for https://github.com/aspnet/Identity/issues/1121, we should look at this early in preview3
@ajcvickers @divega @javiercn @danroth27
The text was updated successfully, but these errors were encountered: