-
Notifications
You must be signed in to change notification settings - Fork 293
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
Migrations #1181
Migrations #1181
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool and needed PR! I'm approving it even if I have a question regarding migration number handling.
Should we also include a command in yetictl rather than running poetry run python core/migrations/arangodb.py
?
This will also be useful to handle stop_at
argument.
core/migrations/migration.py
Outdated
def update_db_version(self, version: int): | ||
raise NotImplementedError | ||
|
||
def migrate_to_latest(self, stop_at: int = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't rely on migration name which already includes a number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functions are arbitrarily named, so we wanna calculate them from the order they've been pushed in
This PR introduces a migration framework for ArangoDB and includes an initial migration to update the database to version 2.
The migration framework allows for incremental updates to the database schema and data, ensuring that the database remains consistent across different versions of the application.
This initial migration ensures that a new field introduced in #1175,
is_valid
, is populated on all database Obseravbles.