append content of modifySql tag is also appended to rollback of statement

Hi,

Is this the expected behaviour? If so is there a way to disable this?

I logged an issue at http://liquibase.jira.com/browse/CORE-457 in case its a bug

Thanks in advance,
Christian.

I don’t think it should be expected behavior, at the minimum we should allow control over if it is applied to rollback or not.  There are times you would want the modifySql to be applied, such as when you are modifying table names, schema names, data types etc.

Thanks for creating the issue.

Nathan

Thanks for the reply.

Does the schema change for the modifySql tag mean a change cannot go into version 1.9.5? If it can and 1.9.5 is scheduled for release soon I’ll assign the ticket to myself and create a patch for you against the 1.9.x branch. This change is pretty important to me.

Cheers,
Christian.

For anyone else with this issue, I’ve updated the ticket above with a work around.

Thanks for the update.  Since modifying modifySql would require a schema change, it cannot go into 1.9.  Are you still needing a change, or are you good with the workaround?

Our plan is to not put a lot of new feature work into 1.9.x, but focus only on bug fixes in that branch.  We are deep into 2.0 which will is the focus of new functionality, and we want to keep the 1.9 branch as stable as possible and minimize duplicated work.

If you would like to look at implementing the change for 2.0, take a look at the code in trunk.

Nathan

Yeah I worked out it can’t go into 1.9.x. I’ve looked at the code in trunk and will submit a patch as an attachment to the ticket.

Thanks again,
Christian.

Actually, you can commit directly to SVN if you have a liquibase.jira.com account.  I will look over all commits, and I am hoping that it will reduce patch application errors, make contributions easier, and give contributors better credit.

Nathan

This is an old issue but just bit me in the arse.  I’m having trouble getting “engine=innodb” onto the end of my “create table” statements.


The statement seems to be corrupting the later statement that tells the changelog how to rollback.  So I have e.g.:


  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2.    
  3. <span class="Apple-tab-span":modifySql}' is expected.


It seems that createTable supports automatic rollback, so I don’t have to specify and the rollback ought to still delete the table, but still, the way affects every other element in the changelog irks me quite a great deal.  I started getting this error as soon as I started using modifySql, and removed all other statements (the foreign key constraint, some data modifications etc) and was suprised to find even a isn’t safe from its modifications.


Can I vote somewhere to have the engine specifier added to ?


All this only became apparent when I moved from a database that had the default engine set as InnoDB to a remote server whose default engine is MyISAM, and I suddenly needed to specify the engine in my changelogs.  Achieving this seems to be a real pain.  I don’t want to get into writing Java extensions to liquibase (as I read here that you can). 


<futher rant removed :)>


Nick