tag command

I’m confused as to how the tag feature works…

I issued an upgrade command  to send a set of changesets to the db.
They all went through.

Then I ran liquibase again with the tag option, to tag it with my build number.

Look back across the 15 changes that went in, only the last 5 were tagged.

Is this expected?

If I were to rollback to that tag, would the other 10 changes marked tag “null” be rolledback?

What you are seeing is correct.  What the tag command does is bookmark the last change executed, so when you rollback to that tag, it will roll back all changesets after changeSet bookmarked.  Since the 1.9 codebase just uses the date executed as an order by to determine the last changeset, if your databases does not support time precision smaller than the execution time of the last few changeSets, multiple ones may be marked.  That is fine, though, because the order of the changelog is used to determine on rollback what the actual last changeSet is.

So for you, if you roll back to your tag, everything after the 5 tagged changeSets will be rolled back.  If you roll back to the tag before then all 15 changes will be rolled back.

Nathan

Excellent. The time precision make sense.

Thanks