Perform parameterized lipidase set changes multiple times with different parameters

I have been struggling with the licbase issue for some time now and I hope someone here can help me:

I would like to execute multiple parameterized fluids script multiple times on the same db circuit with different parameters:

<changeSet id="1" author="me" dbms="Oracle" runOnChange="false" failOnError="true">

   <sql splitStatements="true">
      GRANT SELECT on SOME_VIEW to ${db_user};
   </sql>
</changeSet>

      

I now execute Liquibase once with -Ddb_user = first_user, not with -Ddb_user = second_user. The second run failed because Liquibase evaluates checkSum after replacing the $ {db_user} parameter (which makes sense) and therefore the combination of id / author / filename and checkSum is already present in the DATABASECHANGELOG table.

Is there a better way to solve this problem?

Thanks in advance.

+3


source to share


2 answers


There is an attribute runOnChange

for changeSet

that will run your changeset every time it is changed. Perhaps this does what you are looking for?



0


source


You can always use runOnChange=true

or<validCheckSum>any</validCheckSum>



There is a problem that explains this solution here: https://liquibase.jira.com/browse/CORE-2506

0


source







All Articles