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

Validator schema upgrade #314

Closed
wants to merge 2 commits into from
Closed

Validator schema upgrade #314

wants to merge 2 commits into from

Conversation

charithabandi
Copy link
Contributor

Legacy branch : (v0)

  • Without schema_version table
  • No Join expiry in Join requests

V1:

  • Introducing schema_version table that tracks the version the database is at
  • added expiresAt column to the join_reqs
  • set the API version to 1

Process:
We check existence of the version and data tables and decide the version the database is at and run appropriate upgrades or initializations. Below are the scenarios that can occur:

  1. Fresh DB start, no version and data tables ----> Do regular initialization, set the version to currentVersion.
  2. Legacy mode: data tables exist but not version. ----> Add version table, set the version to currentVersion and run Migrations to update the join_reqs table
  3. Data and version tables exist, and we are on correct version ----> do regular initialization
  4. Future purposes: If we are on lower versions -> run migrations

@charithabandi
Copy link
Contributor Author

#318 Use this PR instead

@charithabandi charithabandi deleted the val-upgrade branch February 1, 2024 17:57
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