gnorm icon indicating copy to clipboard operation
gnorm copied to clipboard

Expose COLUMN_TYPE column for MySQL

Open Etomyutikos opened this issue 6 years ago • 2 comments

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.

Etomyutikos avatar Dec 19 '17 18:12 Etomyutikos

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.

Etomyutikos avatar Dec 19 '17 18:12 Etomyutikos

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.

natefinch avatar Dec 21 '17 14:12 natefinch