How do I update a changelog for liquibase if my changes are not being applied?

58 views Asked by At

I am currently unable to get liquibase to update SQL tables it has previously entered by updating the per-existing change log files which results in any updates to the CSV files which store the drop down types being ignored.

Currently, I'm attempting to update a set of drop down options that are stored in a mySQL table in order to add additional specimen types to the default set of the OpenSpecimen Software. This is an Open Source LIMS and is available here: https://github.com/krishagni/openspecimen I have created my own fork for the purposes of keeping changes I make separate from the original code (here). Currently, my fork is one commit behind my local source code, but I am still providing this for reference.

OpenSpecimen utilizes liquibase in order to manage its SQL database during product upgrades, and using liquibase I have located the CSV files I need to modify in the $Project_Root/WEB-INF/resources/db/2.0/permissible-values/ directory. In this directory I modified the following files:

  • biohazard.csv
  • gender.csv
  • sample-class-and-type.csv
  • container.csv Then, I updated the permissible-values.xml file to include the runOnChange="true" tag for the files that I have updated as shown below:
<changeSet author="vpawar" id="Specimen type PVs" runOnChange="true">
    <preConditions onFail="MARK_RAN">
      <sqlCheck expectedResult="0">
        select 
          case when (count(*) > 0) then 1 else 0 end 
        from 
          catissue_permissible_value
        where
          (public_id = '2003991'  or public_id = 'specimen_type') and
          parent_identifier is not null
      </sqlCheck>
    </preConditions>
    <loadUpdateData file="db/2.0/permissible-values/specimen-class-and-type.csv" tableName="catissue_permissible_value" primaryKey="identifier">
      <column name="identifier" type="COMPUTED"/>
      <column name="parent_identifier" type="COMPUTED"/>
    </loadUpdateData>
</changeSet>

Despite this, liquibase has not updated the tables on the next run, resulting in the new values being unavailable in the drop down.

0

There are 0 answers