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

Refactor storage migrations #7378

Closed
oyvindeide opened this issue Mar 7, 2024 · 0 comments · Fixed by #7570
Closed

Refactor storage migrations #7378

oyvindeide opened this issue Mar 7, 2024 · 0 comments · Fixed by #7570
Assignees

Comments

@oyvindeide
Copy link
Collaborator

Adding a new migration is getting a bit complicated, as we have to add a new entry and remember to add all previous migrations, as we are always going from version x -> latest, instead of iterating through the changes. Suggest a refactor to something like:

if version == 0:
    # Block storage
    migration 0 -> latest
else:
    for migration in migrations:
        migration(...)

then migrations are functions like 1to2, 2to3, or something like that.

@oyvindeide oyvindeide moved this to Todo in SCOUT Mar 7, 2024
@oyvindeide oyvindeide moved this from Todo to In Progress in SCOUT Apr 3, 2024
@oyvindeide oyvindeide self-assigned this Apr 3, 2024
@oyvindeide oyvindeide moved this from In Progress to Ready for Review in SCOUT Apr 5, 2024
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in SCOUT Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant