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

feat: add database migrations up to 1.2.0 #874

Merged

Conversation

kentbull
Copy link
Contributor

@kentbull kentbull commented Oct 8, 2024

Adds database migrations for:

  • 0.6.7 (Jun 16, 2022) -> 0.6.8 (Nov 2, 2022): hab_data_rename (new)
  • 0.6.8 (Nov 2, 2022) -> 1.0.0 (Mar 31, 2023): add_key_and_reg_state_schemas (new)
  • 1.0.0 (Mar 31, 2023) -> 1.2.0 (Oct 4, 2024): rekey_habs (already existed)

I discovered the need for the hab_data_rename migration while testing migration for 0.6.7 test Root GAR databases similar to production as we believe v0.6.7 is what is in production for Root GARs.

The add_key_and_reg_state_schemas we initially thought was specific to Provenant yet in my testing it turns out it is needed to take a Root GAR 0.6.7 database up to 1.0.0, so not specific to Provenant.

I added the name, base, and temp args to db.migrate(...) so that the viring.Reger database could be initialized without having to open up the Habery.

Important

The rekey_habs migration is not run even though it is included in this PR because it's version of 1.2.0 is above the KERI version of 1.1.19 stated in KERIpy. That migration is only needed for the v1.2.x series of releases. I include it in this PR only for completeness to remove any question of whether it is needed or not. It's not needed, though it is useful to see in this PR for reference.

@kentbull kentbull force-pushed the add-migration-support-and-2022-10-05-hab-migration branch 4 times, most recently from c9216ca to c5319af Compare October 9, 2024 15:21
@kentbull kentbull added the enhancement New feature or request label Oct 9, 2024
@kentbull kentbull force-pushed the add-migration-support-and-2022-10-05-hab-migration branch from c5319af to eab003f Compare October 9, 2024 18:29
@kentbull
Copy link
Contributor Author

kentbull commented Oct 9, 2024

This includes the semver cleanup idea from #872

@kentbull kentbull self-assigned this Oct 9, 2024
including database migrations for 0.6.7 (None) -> 0.6.8, 0.6.8 -> 1.0.0, 1.0.0 -> 1.2.0
@kentbull kentbull force-pushed the add-migration-support-and-2022-10-05-hab-migration branch from eab003f to d972a24 Compare October 10, 2024 16:10
@pfeairheller pfeairheller merged commit a2821df into v1.1.19 Oct 11, 2024
6 checks passed
@pfeairheller pfeairheller deleted the add-migration-support-and-2022-10-05-hab-migration branch October 11, 2024 19:40
kentbull added a commit to kentbull/keripy that referenced this pull request Oct 14, 2024
including database migrations for 0.6.7 (None) -> 0.6.8, 0.6.8 -> 1.0.0, 1.0.0 -> 1.2.0
pfeairheller pushed a commit that referenced this pull request Oct 24, 2024
* feat: add database migrations up to 1.2.0 (#874)

including database migrations for 0.6.7 (None) -> 0.6.8, 0.6.8 -> 1.0.0, 1.0.0 -> 1.2.0

* fix: preserve name from 0.6.7 -> 0.6.8

* chore: remove unused db in 1.1.x releases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants