MLOS
MLOS copied to clipboard
Schema versioning for Sql Storage
- [ ] Add a
schema_version
table. - [ ] If it doesn't exist, infer version 0
- [ ] Maintain code that adjusts the tables step by step from version 0 to version N (the latest)
- (e.g., column renames, table additions, etc.)
Better yet, use this: https://alembic.sqlalchemy.org/en/latest/
Note:
- table additions are already natively supported via sqlalchemy's
create_all()
call. - it's only column changes that needs additional work.