-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
mySQL schema data model updates #19472
Conversation
ec6776b
to
1d748f0
Compare
The changelog type |
The changelog type |
@@ -83,7 +83,6 @@ def __init__(self, check, config, connection_args): | |||
self._version_processed = False | |||
self._connection_args = connection_args | |||
self._db = None | |||
self._check = check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleting a duplicate, see L81
@@ -385,6 +385,7 @@ files: | |||
hidden: true | |||
description: | | |||
Configure collection of schemas (databases). | |||
Only tables and schemas for which the user has been granted SELECT privileges are collected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will want to address this in a future PR, current best path forward seems to be setting up prepared statements that can query all schema info.
index_data["cardinality"] = int(row["cardinality"]) | ||
index_data["index_type"] = str(row["index_type"]) | ||
index_data["non_unique"] = bool(row["non_unique"]) | ||
index_data["expression"] = str(row["expression"]).strip().lower() if row["expression"] else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of .strip().lower()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was thinking about normalizing some of these values at one point, but probably not necessary. Removed this
What does this PR do?
Updating the mySQL schema data model.
I've left columns and foreign keys as is, but partitions and indexes have been re-shaped. I've also removed a few columns that I don't find very useful, listed below. Please check me on these, here is the documentation for indexes and partitions
Partitions changes
Indexes changes
Updated all unit tests to cover these changes.
Motivation
We want to display mySQL schemas in the schemas explorer page
Review checklist (to be filled by reviewers)
qa/skip-qa
label if the PR doesn't need to be tested during QA.backport/<branch-name>
label to the PR and it will automatically open a backport PR once this one is merged