Roll up addColumn and dropColumn changes for MySQL

Description

Currently the produced SQL for MySQL for the addColumn change is inefficient, if multiple columns are added at once. In that case, only one ALTER TABLE statement should be produced which can add the new columns in one go and therefore speed up the database migration. This is especially painful for large tables, as MySQL needs to copy the whole table in order to add columns. If the statements are combined into one alter table, the copy needs to be done only once.

A similar approach should be possible with dropColumn.

Note: This improvement is similar to but only for one single change.

Environment

MySQL

Status

Assignee

Unassigned

Reporter

Andreas Dangel

Labels

None

Components

Affects versions

3.1.1

Priority

Major