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

Refactor dbTool isConnected and add check for valid schemas #965

Open
broxen opened this issue Sep 7, 2022 · 1 comment
Open

Refactor dbTool isConnected and add check for valid schemas #965

broxen opened this issue Sep 7, 2022 · 1 comment
Labels
bug Verified bug enhancement Enhancement to server functionality.
Milestone

Comments

@broxen
Copy link
Collaborator

broxen commented Sep 7, 2022

bool DBConnection::isConnected()

Refactor dbtool isConnected() and check for valid schemas:

  • isConnected() should probably just verify that the database connection is "open" and may be as simple as m_db->isValid() (may avoid the segfault) and m_db->isOpen() regardless of the DB Driver;
  • Create a new method hasValidSchema() (or whatever) to verify that the databases QT is connected to have been properly created with the SEGS schemas
  • Check the schema version against latest migration to verify schemas are up to date, which dbtool already does in getDBVersion and getTableVersions.
  • Expose version-check functionality to SEGSAdmin by command line switch.

This may resolve the Segfault on MySQL database creation that Mobby described in discord: https://discord.com/channels/242088237596803073/431572260692819988/1016553898577776660

This will help tee up SEGSAdmin for upgrade path workflow as described in #895

@broxen broxen added bug Verified bug enhancement Enhancement to server functionality. labels Sep 7, 2022
@broxen broxen added this to the Proposals milestone Sep 7, 2022
@broxen broxen added this to To Do in Admin and Database Management Tools via automation Sep 7, 2022
@broxen
Copy link
Collaborator Author

broxen commented Sep 7, 2022

This will expose db checks to resolve #892 as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified bug enhancement Enhancement to server functionality.
Development

No branches or pull requests

1 participant