gnorm
gnorm copied to clipboard
Expose COLUMN_TYPE column for MySQL
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.
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.
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.