Usages of Liquibase

21 views
Skip to first unread message

Jon C

unread,
Nov 12, 2008, 3:38:17 PM11/12/08
to Autobase
First off, I like the looks of Autobase. Great work:).

As I read through the docs on github, I saw several references to
Liquibase. Is Autobase using Liquibase behind the scenes to run
migrations?

Looking forward to your trijug presentation...

Jon

Robert Fischer

unread,
Nov 12, 2008, 3:42:18 PM11/12/08
to grails-...@googlegroups.com
Yes. Autobase is built on Liquibase-DSL, which is a Groovy interface to Liquibase that I wrote.

~~ Robert.

~~ Robert Fischer.
Smokejumper Consulting http://smokejumperit.com
Enfranchised Mind Blog http://enfranchisedmind.com/blog
LinkedIn Profile http://www.linkedin.com/in/robertfischer
Twitter Feed http://twitter.com/robertfischer

Jon C

unread,
Nov 12, 2008, 3:48:53 PM11/12/08
to Autobase
On Nov 12, 3:42 pm, Robert Fischer <robert.fisc...@smokejumperit.com>
wrote:
> Yes.  Autobase is built on Liquibase-DSL, which is a Groovy interface to Liquibase that I wrote.

Excellent! I'm a big fan of Liquibase and I was unsure after reading
the Autobase docs if it was actually built on LB or not. Perhaps it
might be useful to others to mention this, like in the 5 paragraph
overview? http://github.com/RobertFischer/autobase/wikis/5-paragraph-overview

One more question. Say I create changeset Jon/SomeChangeSet, and then
another changeset Jon/AnotherChangeSet.

I need them to be applied in the order that they were created as the
2nd depends on the 1st - does Autobase handle that?

Jon

Robert Fischer

unread,
Nov 12, 2008, 4:03:56 PM11/12/08
to grails-...@googlegroups.com
Liquibase is explicitly non-linear with changesets, and pushes you towards using preConditions to
validate db state, not assuming previous change sets were applied. If two things are so tightly
coupled that you want to make sure one is applied after the other, the proper way to do this is to
put the SomeChangeSet and AnotherChangeSet functionality into the same changeSet.

If you really *must* do this, there is a "changeSetExecuted" preCondition:
http://liquibase.org/manual/preconditions#changesetexecuted But that approach is dirty: in general,
you should step back and see if there's a more natural way in Liquibase to accomplish what you're
looking to do.

The "changeLogFile" is ./migrations/changelog.groovy -- I should set up the system to automatically
default that: http://jira.codehaus.org/browse/GRAILSPLUGINS-618

~~ Robert.

--

Jon C

unread,
Nov 12, 2008, 4:11:53 PM11/12/08
to Autobase
You make a good point about the use of preconditions. I've never
thought about that issue b/c I've always explicitly ordered changesets
in a Liquibase changelog.xml file that looked like:

<databaseChangeLog>
<include file="database/2008.04.17.ISSUE-1085.some_description.xml" /
>
<include file="database/2008.05.22.ISSUE-1088.some_description.xml" /
>
<include file="database/2008.06.08.ISSUE-1124.some_description.xml" /
>
</databaseChangeLog>

But I can definitely appreciate the usefulness of preconditions, and
the above approach might not scale well with multiple developers
getting making changesets simultaneously.

Sounds good - I'm happy as long as there is *some* way to order
changesets.
Jon


On Nov 12, 4:03 pm, Robert Fischer <robert.fisc...@smokejumperit.com>
wrote:
> Liquibase is explicitly non-linear with changesets, and pushes you towards using preConditions to
> validate db state, not assuming previous change sets were applied.  If two things are so tightly
> coupled that you want to make sure one is applied after the other, the proper way to do this is to
> put the SomeChangeSet and AnotherChangeSet functionality into the same changeSet.
>
> If you really *must* do this, there is a "changeSetExecuted" preCondition:http://liquibase.org/manual/preconditions#changesetexecuted But that approach is dirty: in general,
> you should step back and see if there's a more natural way in Liquibase to accomplish what you're
> looking to do.
>
> The "changeLogFile" is ./migrations/changelog.groovy -- I should set up the system to automatically
> default that:http://jira.codehaus.org/browse/GRAILSPLUGINS-618
>
> ~~ Robert.
>
>
>
> Jon C wrote:
> > On Nov 12, 3:42 pm, Robert Fischer <robert.fisc...@smokejumperit.com>
> > wrote:
> >> Yes.  Autobase is built on Liquibase-DSL, which is a Groovy interface to Liquibase that I wrote.
>
> > Excellent!  I'm a big fan of Liquibase and I was unsure after reading
> > the Autobase docs if it was actually built on LB or not.  Perhaps it
> > might be useful to others to mention this, like in the 5 paragraph
> > overview?http://github.com/RobertFischer/autobase/wikis/5-paragraph-overview
Reply all
Reply to author
Forward
0 new messages