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

Versioning data and schema #210

Closed
dmethvin-gov opened this issue Aug 8, 2018 · 3 comments
Closed

Versioning data and schema #210

dmethvin-gov opened this issue Aug 8, 2018 · 3 comments
Labels
[practice] engineering Engineering related work [type] documentation Documentation related work

Comments

@dmethvin-gov
Copy link
Contributor

Often the schema for collected data might change over time, for example, to add, change, or remove fields. When that happens the front-end and back-end code need to agree on which "version" of they form data they are working with. That is especially true if it the user can save intermediate data (partially completed forms) to the server, or if the completed form is saved to individual fields in a SQL database for example.

The JSON Schema standard defines a $schema property and the vets.gov schemas define it, but that specifies the version of the schema itself--not the data being validated by the schema.

Some folks have created a SchemaVer to address the issue. It's similar to SemVer used in software, but looks like MODEL-REVISION-ADDITION, i.e. dashes instead of dots. The wiki spec and associated blog post have examples of schema changes and the version updates they require. Quoting the SchemaVer page linked above:

  • MODEL when you make a breaking schema change which will prevent interaction with any historical data
  • REVISION when you introduce a schema change which may prevent interaction with some historical data
  • ADDITION when you make a schema change that is compatible with all historical data

We should encourage use of a SchemaVer in the schema to help form creators understand this issue and ensure they don't save incompatible form data in their backend.

@dmethvin-gov dmethvin-gov added [practice] engineering Engineering related work [type] documentation Documentation related work labels Aug 8, 2018
@jcmeloni-usds
Copy link
Contributor

I like it!

@jcmeloni-usds
Copy link
Contributor

@dmethvin-gov Going to make this a later-phase item to address via documentation or otherwise.

@dmethvin-gov
Copy link
Contributor Author

This was a nice-to-have but not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[practice] engineering Engineering related work [type] documentation Documentation related work
Projects
None yet
Development

No branches or pull requests

2 participants