Small liquibase problem : dropping and creating fkc's

Hi all,

I have a small problem with liquibase. I don’t know what I did wrong and at what point, but liquibase keeps insisting on dropping and adding a small subset of fkc’s (foreign key constraint) in my project.

Apparently everytime I alter the model, somehow the changes get stored somewhere for liquibase to find out what has changed and generate new changelog files. It is not based on a fresh analysis of the model but on a “hardwritting” of the model modification info. Because If I alter the model and then alter it back to what it was, two changesets are generated.

My problem is that I must have altered something in a way that whenever I start my project, liquibase automatically generates changesets that I don’t want to either execute nor store in changelog files. See a screenshot where this is illustrated.
screenshot liquibase problem

Also I have the problem that I have recently introduced changes but can’t only execute the changeset that affects the database in the way I need. The other ones keep related to the failed fkc’s keep appearing no matter what I do (although I have let them be run on an attempt that they aren’t prompted anymore, but they keep being included everytime I start the app).

That’s why I think there has to be somewhere where I can delete a file and solve the problem.

Another possible solution I have come up with is to delete the whole changelog directory and try that liquibase generates a new changelog based on the current state of the model. Is it possible to do a fresh restart of the changelog files?. I know I would have to delete as well the databasechangelog table in the db. If this worked I think I would prefer this solution. Has anyone tried it?

Any ideas?
Thanks in advance for your help.

Regards.
Carlos.

Hi

It seems that here is a bug in Jmix Studio that affects some particular model state that you have in your project.

I see that you tried to execute this foreign key recreation changeset and they keep being generated again. So then deleting and regenerating all changelogs in the project won’t help.
As a workaround you can just ignore those unwanted changesets and they won’t appear on next diff generation. Select changeset and press “minus” button on the top-left toolbar, select “Remove and Ignore” option.

It also would be very helpful if you can provide some sample project where that case can be reproduced. E.g. remove all sensitive data from your current project and send it to Jmix team. Feel free to use forum private messages.

Thanks for the tip. At least, although the issue still appears don’t need to mess around anymore with the FK’s.

Thanks and regards,
Carlos.