Hi @MikeOlivas @aditi
I am working on a requirement, where i need to generate files with specific names.
SO i have written a SQL parser to parse the changeset and append jira id with the filename.
But problem is, whenever i run liquibase , it overrides the very first file ( if there is no change) and makes it blank.
can i avoid it? it should not override already generated file if there is no change detected.
Hi @Pooja Can you give a little more context when you same that Liquibase overrides the very first file?
I don’t know the scenario where liquibase updates the changeset directly.
Hi @Pooja . From what I can tell, you are trying to rewrite the changelog for its original intent and creating your own changlog using just the sql output of an updateSQL command.
The updateSQL command is meant to show what liquibase would do against a database if run at that point in time.
So it makes sense that a previously executed change has already been run against the database when you run updateSQL because it no longer needs to the run the previous one from iteration 1.
If it has not run against the database in question then it should have both GNA-1234 and GNA-4567 to execute.
I would suggest using quality checks instead of rewriting the files to make sure that a JIRA ticket is added to the label of the changeset(s) that are fixing or addressing that JIRA ticket as an alternative option. This way it gets caught much earlier in the cycle and you are not having to rewrite changesets.