spotorm / spot2

Spot v2.x DataMapper built on top of Doctrine's Database Abstraction Layer
http://phpdatamapper.com
BSD 3-Clause "New" or "Revised" License
601 stars 101 forks source link

migrate in order of entity #201

Open marcelloh opened 7 years ago

marcelloh commented 7 years ago

It would be nice if migrate() creates new column in order of appearance in the entity

in Mysql you can do ALTER TABLE MyTable CHANGE columnx columnx VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL BEFORE columny;

That makes the database more readable

tuupola commented 7 years ago

IIRC ALTER TABLE ... BEFORE and ALTER TABLE ... AFTER is MySQL only feature. Nice to have feature but it probably adds unneeded complexity.