Migrations create uncessary ALTER TABLE statements when sqlType="" used in schema
I am using sqlType="INTEGER UNSIGNED" on a number of columns in a MySQL database. When I run the diff propel creates an ALTER TABLE statement for every column that has an sqlType="" defined.
e.g.
The getUpSQL() has lots of:
ALTER TABLE Bookings CHANGE id id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT;
and the getDownSQL() has lots of:
ALTER TABLE Bookings CHANGE id id int(10) unsigned NOT NULL AUTO_INCREMENT;
This happens every time I run a diff. e.g. diff, migrate (changes are applied), diff (same set of alter table statements are generated).
Happens on both Propel 1.6.9 and 1.7.0
Just discovered I get exactly the same problem with a varbinary column:
schema.xml <column phpNamingMethod="nochange" name="valueBinary" type="varbinary" required="false"/>
getUpSQL:
ALTER TABLE Settings CHANGE valueBinary valueBinary MEDIUMBLOB;
getDownSQL:
ALTER TABLE Settings CHANGE valueBinary valueBinary LONGBLOB;
@exptom Did you got a workaround for this? It's very annoying.
No, we have just been removing the unnecessary SQL from the migration each time.