Skip to content

enums should be a string type? #14

Description

@daytonlowell

Currently joi-sql outputs enums as any() type.
https://github.com/TehShrike/joi-sql/blob/master/build.js#L68.

As far as I can tell, MySQL enum values can only be a string.
https://dev.mysql.com/doc/refman/5.7/en/enum.html#enum-literals)

I've switched yup-sql to output enums as a string type.
https://github.com/daytonlowell/yup-sql/blob/master/build.js#L75

Thoughts?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions