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

Problem with long enums #276

Open
l1f opened this issue Nov 14, 2022 · 1 comment
Open

Problem with long enums #276

l1f opened this issue Nov 14, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@l1f
Copy link

l1f commented Nov 14, 2022

I noticed that aerich handles enums strangely. Instead of creating them as ENUM field in the table, a VARCHAR(length of the longest field in the enum) is used and the intended values are stored as a commetar at the field.

However, this currently leads to problems for me, I have relatively many entries in an enum, which is why I get an error when I try to execute the migration.

pymysql.err.OperationalError: (1629, "Comment for field 'type' is too long (max = 1024)")

My workaround is to remove the comment field from the migration. However, this is a bit annoying in the long run, because aerich tries to add the comment every time I create a new migration.

Is there any plan to support enum fields in the database as well?

@l1f l1f changed the title Problem with log enums Problem with long enums Nov 14, 2022
@waketzheng waketzheng added the enhancement New feature or request label Dec 12, 2024
@waketzheng
Copy link
Contributor

Wait for tortoise-orm to support it: tortoise/tortoise-orm#937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants