afterMigrations changeSet attribute - to be run only when migrations occur and after them all

We use a table generator id strategy, and we’re updating our hibernate_sequences table whenever we insert new data.

The nature of updating that table is that we always want to do it, but only when migrations have been applied (i.e. not on a simple deployment where no database migrations occurred).

I’m thinking that we could define a changeset with the updates in, and have the changeset marked

  1. <changeSet afterMigrations=“true” …>
  2.    <update table="hibernate_sequences>
  3. etc
Does anyone have any suggestions before I go off and look at creating a pull request?

I usually just have a included changelog at the bottom of my master with any changeSets that always need to run and use the runAlways=true attribute. That way they always run and always run after everything else.

That doesn’t track if changes have happened, though. If you want to create a pull request I’d definitely look at including the functionality. 


Great, LMK if you have any questions with implementation.


Thanks Nathan.

I’ve moved the story that depends on it up, so with a following wind it could get pulled reasonably soon.