joi-sql icon indicating copy to clipboard operation
joi-sql copied to clipboard

enums should be a string type?

Open daytonlowell opened this issue 5 years ago • 1 comments

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?

daytonlowell avatar Feb 21 '20 16:02 daytonlowell

Makes sense to me 👍

TehShrike avatar Mar 06 '20 12:03 TehShrike