-
Notifications
You must be signed in to change notification settings - Fork 0
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
DM-41028: Add schema version support and check to SQL backend #41
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.
Looks good--just one small comment in a spot I got confused.
return VersionTuple.fromString(version_str) | ||
return default | ||
|
||
initial_version = VersionTuple(0, 1, 0) |
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.
I was confused why this wasn't VERSION
, so a comment pointing out that this is used to specify versions in old schemas when the metadata is not present would be helpful.
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.
👍 I'll add a comment.
Apdb class now has an associated version number and schema version number (latter comes from YAML schema). Both version numbers are stored in metadata table when schema is initialized. Versions are read when ApdbSql is instantiated and version numbers are compared to what is defined in YAML and in the code.
Also improved handling of empty schema in SQL backend.
86ccfeb
to
54a2978
Compare
Apdb now understands
metadata
table specification in sdm_schemas. Apdb now verifies that its own version and schema version in sdm_schemas are compatible with the versions stored in metadata table. Both metadata table and sdm_schemas version numbers are optional, if they are missing they are assumed to be "0.1.0".