Modifying auto-generated rollback

Hello again,

I have hundreds of foreign key constraints defined in changeSets that looks like this:

This works fine on the 2 databases I need to support (oracle + mssql). However, if I need to rollback this changeSet - LiquiBase fails on mssql as it is appending the " NOT FOR REPLICATION" option to the auto-generated DROP CONSTRAINT sql.

(I see the applyToRollback attribute should default to false).

I’m looking to extend the core LiquiBase to support my requirements, but am not sure which classes to extend to cater for the addForeignKey tags.

In an ideal world, I’d like to be able to define an extension that automatically handles my two mssql modifications (i.e. the replace and the append) - which classes would I extend to do this?

Alternatively, how do I stop LiquiBase appending the extra text to the auto-generated roll-back?



Did the commit you make resolve this issue for you?  Or was that another?



The fix I committed did indeed resolve the issue.

However, it would still be useful to know how I would be able to create some extended classes to support the two modifySql tags that I am including for mssql. Ideally I’d like just to have a single addForeignKeyConstraint tag which handles my custom mssql modifications as well as other databases as usual. Are there any examples that demonstrate this?

I’ve started some documentation on how the extension framework works.  I’m going to fill in more before the 2.0 final release, but have been focusing on the code first.  Most of the documentation I have is on the right side of in the “Resources” section.

Let me know if you have questions that the docs do not cover yet.  It will help me know what to add.