I want to insert usernames to the database based on a system property. The system property value can be
users="user1;user2;user3"
This process must be repeatable, meaning that every time the applications is deployed, the migration/changeset must check the system property, and if it has changed and the users are not already in the database it should insert them. In order to achieve this I am thinking of using the customChange tag. But I want this change to run every time the liquibase runs. Is this possible using liquibase or should I create a custom contextLoadListener?
A standard attribute available to all changesets is the runAlways
attribute, which should do what you want. There is also a runOnChange
attribute available.
Documentation on the attributes available is here: http://www.liquibase.org/documentation/changeset.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With