My local openMrs refference application doesnt run the liquibase changeset

Am working on where am supposed to add a changeset in the liquibase file of the referencemetadata module that deletes duplicate concepts, however i realised the the installation doesnt run the liquibase file at all. i decided to try a a very simple changeset <?xml version="1.0" encoding="UTF-8"?>

    <changeSet  author = "MUTESASIRA M0ZZY" id="20131010">
       <comment>a new table to store multipart files</comment>
       <createTable tableName = "facelist_multipart">
          <column  autoIncrement = "true"  name = "multipart_id" type ="int">  
               <constraints primaryKey="true" nullable="false" />  
          <column name ="patient_id" type ="int"/>


but i realised the liquibase doesnt run at all. do i need any extra configuration for the liquibase in the metadata module?? @samuel34 @tendomart @dkayiwa

@mozzy can you share the full log here ?

1 Like

Can you share the file with all the contents e.g. in a PR.

Side note: It’s good practice to always add a precondition to every changeset.

1 Like

ok i had not yet pushed to git , i was still testing it out on my local machine to confirm it works.

Ya true , i was setting the pre-condition , just that i first wanted to try out a very simple change set , to confirm the liquibase file is run

here is basically wat i added to the liquibase file

<?xml version="1.0" encoding="UTF-8"?>

	<changeSet id="deleting_duplicate_concept" author="Mutesasira">
		<preConditions onFail="MARK_RAN">
			<sqlCheck expectedResult="2">select count(*) from concept_name where name = 'YES'</sqlCheck>
			<sqlCheck expectedResult="2">select count(*) from concept_name where name = 'NO'</sqlCheck>
		 it checks whether  the  duplicate concepts exists and deletes one
		<dropAllForeignKeyConstraints baseTableName="concept"/>
		<delete tableName="concept">
			<where>concept_id =1</where>


here is the the file where am placing the above changeset

but unfortunately wherever i compile the referencemetadata module with those changes in the liquibase file, and i load it in my reference app installation , the module loads succesfuly , the liquibase seems to have no change at all to the database

thats why i wanted to try a basic changeset with no pre-conditions to see if the liqibase will have any effect on the database , after copiling and loading the module again but the same case , so am wondering if i need to add any other configuration in the openmrs/ openmrs-module-referencemetadata for the liquibase to run

How are you telling that it’s not getting run? Logs or looking in the DB to confirm the changes are not applied, I would say look at the logs.