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

use mysql's default string length for mariadb #882

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

itsbekas
Copy link

@itsbekas itsbekas commented Apr 4, 2024

As I presented in #881 , mariadb doesn't have a default string size, unlike mysql, which leads to an sqlalchemy compile error. From what I understood (and tried), simply using the mysql default length and checking for the mariadb dialect.name is enough to prevent this error.

@itsbekas itsbekas marked this pull request as ready for review April 4, 2024 20:35
@itsbekas itsbekas marked this pull request as draft April 4, 2024 20:42
@itsbekas
Copy link
Author

itsbekas commented Apr 4, 2024

I realize now that it might be worth mentioning that the reason I wanted the default value was because setting the max_length metadata wasn't working. After some digging I ended up finding this pull request: #857 which fixes that part of the problem, so maybe these 2 could be merged as they fix different ends of the same problem.

@itsbekas itsbekas marked this pull request as ready for review April 4, 2024 21:55
@stevleibelt
Copy link

Damn, so I just ran into this issue when I've executed alembic upgrade head so far.

This is really sad since - if I get it right - this will stop me from using sqlmodel in my current project and switch back to sqlalchemy :(.

Thanks for your PR.

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.

None yet

3 participants