s-libs icon indicating copy to clipboard operation
s-libs copied to clipboard

[app-state] Feature request: graceful `MigrationManager` error behavior

Open eric-simonton-sama opened this issue 4 years ago • 0 comments

It seems like a common case to want MigrationManager to fall back to the default state if it runs into any issues. Is there a nice way that could be supported without having to make a custom subclass?

Maybe any real use case will want a custom subclass anyway - not sure if it's really worth it. But while prototyping and slowly increasing the stability of an app it seems useful to slap in a default to a [PersistentStore](https://github.com/simontonsoftware/s-libs/issues/67) that silently starts fresh when I change the schema. Almost like a NonMigrationManager 🙂.

Maybe this could be a feature specifically of PersistedStore. The migration manager could be optional, and if there isn't one we use this behavior.

eric-simonton-sama avatar Dec 15 '21 13:12 eric-simonton-sama