Skip to content

[Pg-kit] Fix invalid javascript syntax for default() values in generated schema. #4732

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sh41
Copy link

@sh41 sh41 commented Jul 10, 2025

[Pg] Correctly escape default value string with special characters in them for writing to the TS schema files after introspection.

Fixes #4121 #3559 #4085 #3549

Duplicates some of the work in #4043, but that doesn't seem to be moving forward at the moment, so hopefully this simpler PR can be merged instead.

@sh41 sh41 force-pushed the empty-string-fix branch from 3d2992d to 9fcd07a Compare July 10, 2025 01:08
Added handling for a variety of special chars that need to be escaped when generating the JS schema code after introspection.
@sh41 sh41 force-pushed the empty-string-fix branch from 9fcd07a to 1828206 Compare July 10, 2025 01:10
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

Successfully merging this pull request may close these issues.

[BUG]: drizzle-kit generates schema with invalid JavaScript syntax in default values
2 participants