Skip to content

dolphin: Add ENUM() support #676

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

Merged
merged 3 commits into from
Aug 25, 2020
Merged

dolphin: Add ENUM() support #676

merged 3 commits into from
Aug 25, 2020

Conversation

kyleconroy
Copy link
Collaborator

@kyleconroy kyleconroy commented Aug 25, 2020

I'm still deciding on how to pick the type name for MySQL enums. See the discussion in #502

@kyleconroy kyleconroy merged commit 613de79 into master Aug 25, 2020
@kyleconroy kyleconroy deleted the dolphin-enum branch August 25, 2020 20:16
@kyleconroy
Copy link
Collaborator Author

kyleconroy commented Aug 25, 2020

I'm going to merge this now, but will revisit the naming scheme before v1.6.0 is released.

}
if col.Vals != nil {
typeName := ast.TypeName{
Name: col.Colname,
Copy link
Contributor

@alecbz alecbz Sep 21, 2020

Choose a reason for hiding this comment

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

@kyleconroy I'm not 100% sure when this if triggers (for columns that use an implicit enum for the type, instead of a named one?) but this breaks with "type already exists" if it triggers twice for the same column name.

Thoughts on how to address? Prepending the table's name might be an easy-ish fix?

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

2 participants