Subject: | missing column name quotes cause invalid output for columns like `group` (+ various wishlist items) |
Hi,
MySQL::Diff doesn't quote column names and thus it sometimes generates
output that can't be passed to mysql unchanged:
ALTER TABLE std_grp CHANGE COLUMN grpid group int(10) unsigned NOT NULL
COMMENT 'ID of group';
This fails because group is a keyword. If you change it to `group`, it
works fine.
That one is clearly a bug, but I have some more annoyances which should
probably be classified wishlist and probably don't deservere their own
tickets:
* if the column name doesn't change, it should generate "MODIFY foo"
instead of "CHANGE foo foo"
* the canonical sql comment is --, not #
* mysql-schema-diff outputting the database password doesn't seem smart
* I can't set database names for the automatically created databases -
would be useful for users without CREATE DATABASE privilege
* it would be great if it were possible to run on two files without an
mysql distance running, the docs says it creates the databases just to
run mysqldump -d on them anyway so if I already have two .sql files
obtained from mysqldump -d, it shouldn't be necesary
Anyway thanks for the great tool, it may have some problems but it's the
best I've found and the only one that satisfies my needs.
Thanks,
Martin Hradil