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

BOOLEAN column in schema exposed "number" #16

Closed
dweekly opened this issue Oct 21, 2021 · 2 comments
Closed

BOOLEAN column in schema exposed "number" #16

dweekly opened this issue Oct 21, 2021 · 2 comments

Comments

@dweekly
Copy link
Collaborator

dweekly commented Oct 21, 2021

When running mysql-schema-ts 1.6.2 on a schema with a BOOLEAN MySQL column definition, the output interface renders the field as "number" instead of "boolean". I couldn't find any place in the documentation where this was a deliberate/considered decision vs a bug, so I'm filing the issue here as a request. Thanks!

@dweekly
Copy link
Collaborator Author

dweekly commented Oct 21, 2021

Extra context; MySQL considers "BOOLEAN" columns to be a synonym for "TINYINT(1)" per https://dev.mysql.com/doc/refman/8.0/en/numeric-type-syntax.html

So more formally this is a request to special-case TINYINT(1) as "boolean" instead of "number".

@dweekly
Copy link
Collaborator Author

dweekly commented Oct 21, 2021

Note that this is a request to partially undo 8e9dcf0 and #9 - but looking at the linked comment at SweetIQ/schemats#116 (comment) it seems it may not actually be possible to discern that the column in question is a 1-bit TINYINT (BOOLEAN), so I'll close this out. Sorry.

@dweekly dweekly closed this as completed Oct 21, 2021
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

No branches or pull requests

1 participant