Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roll up addColumn and dropColumn changes for MySQL (CORE-1833) #315

merged 8 commits into from Oct 23, 2014


None yet
3 participants
Copy link

commented Oct 10, 2014

See for details.

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.
A similar approach should be possible with dropColumn.

This implementation changes now AddColumnStatement and DropColumnStatement to maintain a list of columns to be added/dropped. No AlterTableStatement is introduced. AddColumnChange and DropColumnChange generate these "multiple column aware" statements.

See #260 and #311 for the old pull requests.

@nvoxland nvoxland merged commit 60f1b8b into liquibase:master Oct 23, 2014


This comment has been minimized.

Copy link

commented Oct 23, 2014

Looks good, thanks for fixing it up. I added one change to not serialize an empty "columns" attribute in dropColumn to preserve checksum compatibility with existing 3.2 changelogs.


This comment has been minimized.

Copy link
Contributor Author

commented Oct 24, 2014



This comment has been minimized.

Copy link

commented on 96bf5a5 Oct 20, 2015

Hello There,

Please help me with the following query -

I would like to know if the above change which generates "ALTER TABLE

ADD COLUMN1... , ADD COLUMN2.." is going to be part of the version 3.4.2 ? I am currently looking for this kind of solution from Liquibase as one of our customers are looking at adding multiple columns to a very big table in PostgreSQL using Liquibase. At this point, Liquibase generates ALTER TABLE statement one for each column addition. The above code change seems to be fixing that. Can i please know if this is going to be effective in PostgreSQL as well ? if yes, can you please help me when this is going to be released. Thanks in advance for your help !


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.