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

Expose COLUMN_TYPE column for MySQL #89

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Etomyutikos
Copy link
Member

resolves #86

In MySQL, the DATA_TYPE column contains only the basic type of the
column. The COLUMN_TYPE column provides a more detailed explanation of
the column's type, including "unsigned" for numeric types.

resolves gnormal#86

In MySQL, the DATA_TYPE column contains only the basic type of the
column. The COLUMN_TYPE column provides a more detailed explanation of
the column's type, including "unsigned" for numeric types.
@Etomyutikos
Copy link
Member Author

Etomyutikos commented Dec 19, 2017

For a brief explanation of the differences between DATA_TYPE and COLUMN_TYPE, see this SO answer.

@natefinch Unfortunately, this is only possible for MySQL. I could not find an equivalent in Postgres. The original impetus for this PR (see #86) is only a problem in MySQL.

@natefinch
Copy link
Member

So... I'm not entirely sold on exposing this directly. It's not in a very template-friendly format.

It seems like the size from the column type should be put into the column's length field (that sounds like a bug in our mysql code), and maybe add "unsigned" to the column's DBType field.

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.

[mysql] surface unsigned numeric types
2 participants