-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
CLI can't generate entity if enum value starts with a number #1172
Comments
Interesting, should not be a difficult fix Ref: #588 (comment) |
This happens for PostgreSQL as welll; indeed with the MediaWiki schema: CREATE TYPE mediawiki.media_type AS ENUM (
'UNKNOWN',
'BITMAP',
'DRAWING',
'AUDIO',
'VIDEO',
'MULTIMEDIA',
'OFFICE',
'TEXT',
'EXECUTABLE',
'ARCHIVE',
'3D'
); |
1 task
Hey @SPeeSimon @Yuubari, sorry for the delay. Please check #1211 for the fix :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Unable to generate an entity when an enum value starts with a number (basically when it is an invalid enum value).
I am trying to generate entities from an existing database (more precise: a wikipedia schema).
The cli fails to create to generate the source for some tables. The DDL for one of the failing table is:
Steps to Reproduce
sea-orm-cli generate entity --tables image
Expected Behavior
What I don't expect is a "panicked" message, but rather:
Actual Behavior
thread 'main' panicked at '"3d" is not a valid Ident', C:.cargo\registry\src\github.com-1ecc6299db9ec823\proc-macro2-1.0.47\src\fallback.rs:756:9
Reproduces How Often
allways
Versions
sea-orm-cli 0.10.1
mysql
Additional Information
The problem also applies for the tables: filearchive, image, imagelinks, oldimage, uploadstash
The text was updated successfully, but these errors were encountered: