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: updating schema mapping to support additional column metadata. #62

Merged
merged 15 commits into from
Jan 7, 2025

Conversation

cecilycarver
Copy link
Collaborator

Currently, mysql-mimic can only support passing in the column name and type when constructing the MySQL information schema. This PR adds support for specifying column values for the comment, default, and is_nullable fields in a dictionary at the column level.

The existing code works by making some inferences based on the dictionary depth, so this change supports both formats by checking whether the innermost dictionary contains column metadata, and adjusting the expected depth accordingly.

tests/test_query.py Outdated Show resolved Hide resolved
.pylintrc Show resolved Hide resolved
mysql_mimic/schema.py Show resolved Hide resolved
tests/test_query.py Show resolved Hide resolved
@cecilycarver cecilycarver merged commit ecb9132 into main Jan 7, 2025
7 checks passed
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.

2 participants