I just started experimenting with Liquibase and ran into a roadblock which made me question whether I’m approaching the problem correctly. Any advice is welcome. This is my situation:
I have an application that uses multiple mysql databases. I thought it would be a good idea to create a master app.xml file that runs one changelog for each database:
This way all databases for this app are updated in a single update command. I hoped generateChangeLog would include some sort of schema identifier in the generated changelogs, but it does not, meaning that all of the changesets would be applied to the same database. I tried using the outputDefaultSchema option but it made no difference. I know I could add a “schemaName” attribute to each change, but that feels like it’s going to be very susceptible to mistakes (someone is going to forget to add the attribute eventually). Is there a way to set the default schema within each individual changelog?