Because SQLite files can move around, or we might improve our software over time, we need to know what we're looking at.
For example, we might improve the SQLite files that we generate for search. Go from v1 to v2, so to speak. Instead of having migrations, we just start generating new tables. At that point, we might have several thousand tables out there... and, over time, the v2 tables will replace all of the v1s. However, until that time, we need to be able to handle both.
The way to do that is to have a metadata table in every SQLite database. It could be a k/v store (two columns, key and value), and each row contains some info. In this way, we could always have a version key, and that would let us store what version the table is.
(And, possibly, a kind. But... this issue isn't a full design. It is just a reminder that we should look at the SQLite files we generate, and add enough information to them that we can know what they are, when we created them, and if need be, make decisions later about how to interact with them based on a version or similar.)
Process checklist
- [ ] Has a clear story statement
- [ ] Can reasonably be done in a few days (otherwise, split this up!)
- [ ] Shepherds have been identified
- [ ] UX youexes all the things
- [ ] Design designs all the things
- [ ] Engineering engineers all the things
- [ ] Meets acceptance criteria
- [ ] Meets [QASP conditions](https://derisking-guide.18f.gov/qasp/)
- [ ] Presented in a review
- [ ] Includes screenshots or references to artifacts
- [ ] Tagged with the sprint where it was finished
- [ ] Archived
### If there's UI...
- [ ] Screen reader - Listen to the experience with a screen reader extension, ensure the information presented in order
- [ ] Keyboard navigation - Run through acceptance criteria with keyboard tabs, ensure it works.
- [ ] Text scaling - Adjust viewport to 1280 pixels wide and zoom to 200%, ensure everything renders as expected. Document 400% zoom issues with USWDS if appropriate.
At a glance
In order to know what we're looking at as a developer I want consistent metadata in every sqlite file
Acceptance Criteria
We use DRY behavior-driven development wherever possible.
Shepherd
Background
Because SQLite files can move around, or we might improve our software over time, we need to know what we're looking at.
For example, we might improve the SQLite files that we generate for search. Go from
v1
tov2
, so to speak. Instead of having migrations, we just start generating new tables. At that point, we might have several thousand tables out there... and, over time, the v2 tables will replace all of the v1s. However, until that time, we need to be able to handle both.The way to do that is to have a
metadata
table in every SQLite database. It could be a k/v store (two columns,key
andvalue
), and each row contains some info. In this way, we could always have aversion
key, and that would let us store what version the table is.(And, possibly, a
kind
. But... this issue isn't a full design. It is just a reminder that we should look at the SQLite files we generate, and add enough information to them that we can know what they are, when we created them, and if need be, make decisions later about how to interact with them based on aversion
or similar.)Security Considerations
Required per CM-4.
None.
Process checklist
- [ ] Has a clear story statement - [ ] Can reasonably be done in a few days (otherwise, split this up!) - [ ] Shepherds have been identified - [ ] UX youexes all the things - [ ] Design designs all the things - [ ] Engineering engineers all the things - [ ] Meets acceptance criteria - [ ] Meets [QASP conditions](https://derisking-guide.18f.gov/qasp/) - [ ] Presented in a review - [ ] Includes screenshots or references to artifacts - [ ] Tagged with the sprint where it was finished - [ ] Archived ### If there's UI... - [ ] Screen reader - Listen to the experience with a screen reader extension, ensure the information presented in order - [ ] Keyboard navigation - Run through acceptance criteria with keyboard tabs, ensure it works. - [ ] Text scaling - Adjust viewport to 1280 pixels wide and zoom to 200%, ensure everything renders as expected. Document 400% zoom issues with USWDS if appropriate.