py-mysql2pgsql
py-mysql2pgsql copied to clipboard
Handling of BINARY(1) columns
We have a table with a column defined as BINARY(1). This doesn't seem to be defined currently. This should probably just be an int4 column.
Thoughts?
It looks like line 58 of postgres_writer.py should be
elif column['type'] == 'tinyint' or column['type'].startswith('binary('):
I'm not that familiar with width in MySQL, I'll take some time to study this...
binary(1) should probably be converted to bytea(1).
The defined behavior is pretty much identical between the two: https://dev.mysql.com/doc/refman/5.0/en/binary-varbinary.html http://www.postgresql.org/docs/9.0/static/datatype-binary.html