Skip to content

Add PrefsSchema Migration Plan #2

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

Open
3 tasks
orchetect opened this issue Dec 15, 2024 · 0 comments
Open
3 tasks

Add PrefsSchema Migration Plan #2

orchetect opened this issue Dec 15, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@orchetect
Copy link
Owner

orchetect commented Dec 15, 2024

Proposal

Add an abstraction that can help the process of migrating from different PrefsSchema versions, similar to how SwiftData.

Considerations

This may involve adding a versioning system to the PrefsSchema protocol, or to a new VersionedPrefsSchema derivative protocol.

Most likely, SemVer may be utilized but the version semantics could be abstracted such that SemVer is provided as the default implementation but custom implementations could be used.

Providing a comparable version identifier to a prefs schema would allow some degree of automation:

  • detecting prefs schema versions based on storage content by way of a version key/value pair
  • allowing automated schema storage migration to newer schema version(s)

SwiftData employs a schema migration model. Its design may provide a springboard for PerfsKit's implementation.

Action Items

  • Add abstraction type(s)
  • Add unit tests
  • Update REAMDE with example usage
@orchetect orchetect added the enhancement New feature or request label Dec 15, 2024
@orchetect orchetect self-assigned this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant