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

Improve Postgres Enum Default Recognition #794

Merged
merged 2 commits into from Jun 10, 2020
Merged

Improve Postgres Enum Default Recognition #794

merged 2 commits into from Jun 10, 2020

Conversation

do4gr
Copy link
Member

@do4gr do4gr commented Jun 8, 2020

@do4gr do4gr added this to the Beta 9 milestone Jun 8, 2020
Copy link
Contributor

@tomhoule tomhoule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! I haven't re-checked these, but I was just wondering whether we already had a regular expression in that module that we use to match casts, quoted or unquoted. That way we could use it to do a replace and avoid the if <matches this> { replace this } else if <matches that> { replace that }.

@do4gr
Copy link
Member Author

do4gr commented Jun 10, 2020

We have one for datatype suffixes, but in this case we need to check against all the enum names in the schema, so that one does not directly apply.

@do4gr do4gr merged commit f64916f into master Jun 10, 2020
@do4gr do4gr deleted the PostgresEnums branch June 10, 2020 09:56
@janpio janpio modified the milestones: Beta 10, 2.1.0 Jun 11, 2020
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.

Getting dbgenerated() for defaults on enums in Postgres
3 participants