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

db introspection generated schema with invalid syntax for default value with a type cast #551

Open
ynagorny-yotascale opened this issue Aug 18, 2024 · 0 comments

Comments

@ynagorny-yotascale
Copy link

For postgres db field:

account_type varchar(64) DEFAULT NULL::character varying NULL

drizzle-kit introspect generated schema that fails compilation:

accountType: varchar("account_type", { length: 64 }).default(NULL::character varying),

I believe it should be:

accountType: varchar("account_type", { length: 64 }).default(sql`NULL::character varying`),
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

No branches or pull requests

1 participant