dbsrgits / sql-translator

SQL::Translator (SQLFairy)
http://sqlfairy.sourceforge.net/
82 stars 91 forks source link

mysql-parser: Set missing field's collate to table's collate #172

Open gaaf opened 5 months ago

gaaf commented 5 months ago

Newer MariaDB exports don't set the field's collate if it is the same as the table's collate. To prevent huge diffs between exports of the old and new version, set missing field's collate to the table's collate.

The table's option parsing is moved up so the collate can be extracted before parsing all the fields.

There might be a similar issue with the charset, but I haven't seen that with my datasets.