1

we are using liquibase for our DB-Deployment. We are currently doing some refactoring. There is an old changeset which is running an sql script. This has been executed in the past. Now this sql script (or the statement in it) is outdated and I would like to deleted from our VCS System. I did that and tried to deploy again, but I am getting an exception saying that the sql file is not there, although my Changeset has runAlways="false" and runOnChange="false".

Does this mean that I have to always keep the specific sql script always in my CVS although it is deprecated?

1
  • Have you removed the outdated changeset fully or just one file constituting it? In our liquibase migrations we constantly drop old changesets and that works without problems. Commented May 26, 2016 at 6:12

1 Answer 1

1

According how checksum works on Liquibase, you can't delete it. Technically you run that changeset one time, and something happened on DB, then liquibase created a checksum for your file. Now if you change some part of it, liquibase will say your file is updated and you can't do that.

So in summary, your file is part of the story of your application build, even if it is no longer useful, and you can't get rid of it.

If you are not in production case, one solution could be create a dump from your current database as init.sql and start from that.

I hope this helps you.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the answer. I was afraid of that. I just thought, that somebody else might have an idea.
You have to think that the main task of liquibase is have an history of actions in the database and dont allow regresion or unstability, so even if now the file dont make sense, technically one day he did... :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.