You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an enum is defined in a schema other than 'public', Drizzle ORM names the enum as ${enumName}In${schemaName}. However, this naming convention is not consistently applied when tables are typed, regardless of whether they are in the same schema or a different one.
Steps to Reproduce:
Create an enum in a schema other than 'public' using Drizzle ORM.
Create a table which has a column with this enum.
Generate the schema file using drizzle-kit introspect.
Observe the inconsistency in the enum naming within the generated schema file.
Expected Behavior:
The generated schema should consistently use the ${enumName}In${schemaName} format for enums, ensuring that table definitions reference the correct enum type regardless of the schema they belong to.
Actual Behavior:
The generated schema file incorrectly references the enum type without the schema-specific naming convention, leading to potential type errors.
What version of
drizzle-orm
are you using?0.30.10
What version of
drizzle-kit
are you using?0.21.1
Describe the Bug
This is the drizzle.config.ts:
Description:
When an enum is defined in a schema other than 'public', Drizzle ORM names the enum as
${enumName}In${schemaName}
. However, this naming convention is not consistently applied when tables are typed, regardless of whether they are in the same schema or a different one.Steps to Reproduce:
drizzle-kit introspect
.Expected Behavior:
The generated schema should consistently use the
${enumName}In${schemaName}
format for enums, ensuring that table definitions reference the correct enum type regardless of the schema they belong to.Actual Behavior:
The generated schema file incorrectly references the enum type without the schema-specific naming convention, leading to potential type errors.
Example:
Given the following setup:
The generated table definition incorrectly references the enum as
aalLevel
instead ofaalLevelInAuth
:The text was updated successfully, but these errors were encountered: