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

Dog-fooding: Use grate to version grate tables #482

Merged
merged 1 commit into from
Mar 31, 2024
Merged

Conversation

erikbra
Copy link
Owner

@erikbra erikbra commented Mar 19, 2024

Dog-fooding: Use grate to version grate tables

Use grate itself to version the grate tables, instead of doing this explicitly in code.
This is good for two reasons:

  1. We use the best tool out there to version the database ;)
  2. It makes (overdue) changes to some of the grate tables (using outdated types, etc) easier

I introduced a set of "meta" grate tables to handle the versioning of the Grate tables themselves.
So, in addition to (default names):

  • ScriptsRun
  • ScriptsRunErrors
  • Version

we add these tables, to version the tables above:

  • GrateScriptsRun
  • GrateScriptsRunErrors
  • GrateVersion

for versioning these tables themselves, we put the versioning in the same tables
(using delayed writing to the tables for bootstrapping)

  • Wrote tests for existing functionality to make sure we don't break anything
  • Made sure internal tables are created
  • Fixed case-sensitivity in tests
  • Smink -> 0.3.0 (test reporting)

@erikbra erikbra force-pushed the chore/meta-grate2 branch 5 times, most recently from 9241593 to 35a5eed Compare March 31, 2024 23:04
@erikbra erikbra changed the title Chore/meta grate2 Dog-fooding: Use grate to version grate tables Mar 31, 2024
Use grate itself to version the grate tables, instead of doing this explicitly in code.
This is good for two reasons:
1) We use the best tool out there to version the database ;)
2) It makes (overdue) changes to some of the grate tables (using outdated types, etc) easier

I introduced a set of "meta" grate tables to handle the versioning of the Grate tables themselves.
So, in addition to (default names):

* ScriptsRun
* ScriptsRunErrors
* Version

we add these tables, to version the tables above:

* GrateScriptsRun
* GrateScriptsRunErrors
* GrateVersion

for versioning these tables themselves, we put the versioning _in_ the same tables
(using delayed writing to the tables for bootstrapping)

* Wrote tests for existing functionality to make sure we don't break anything
* Made sure internal tables are created
* Fixed case-sensitivity in tests
* Smink -> 0.3.0 (test reporting)
@erikbra erikbra self-assigned this Mar 31, 2024
@erikbra erikbra added this to the 1.6.3 milestone Mar 31, 2024
@erikbra erikbra marked this pull request as ready for review March 31, 2024 23:24
@erikbra erikbra merged commit 786cc93 into main Mar 31, 2024
19 checks passed
@erikbra erikbra deleted the chore/meta-grate2 branch March 31, 2024 23:31
@erikbra erikbra modified the milestones: 1.6.3, 1.7.0 Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant