-
-
Notifications
You must be signed in to change notification settings - Fork 769
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
[BUG] If the index name is the same as the generated name, it will be empty and a type error will occur #3420
Comments
should not be an issue on latest(0.30.0+), if it's still an issue - please reopen |
@AndriiSherman
|
Please check the following PR: #2733 |
thanks! I was wrong about this issue, I'll review this PR and merge! |
Available in |
What version of
drizzle-orm
are you using?0.30.10
What version of
drizzle-kit
are you using?0.21.0
What type of
database
are you using?MySQL
Describe the Bug
When generating a schema from an existing DB using the introspect command, the index name will be empty if it is identical to the generated name.
However, since the index and uniqueIndex functions must take a string as an argument, a type error occurs.
drizzle-orm/drizzle-orm/src/mysql-core/indexes.ts
Lines 102 to 108 in a78eefe
Expected behavior
To avoid type errors, you must always pass the index name.
Patch
The following patch can be applied as a workaround until this issue is resolved.
The text was updated successfully, but these errors were encountered: