Skip to content

Commit

Permalink
Bindu | BAH-3269 | change the sequence of delete queries to fix the m…
Browse files Browse the repository at this point in the history
…igration fail issue
  • Loading branch information
binduak committed Oct 19, 2023
1 parent 50f37eb commit 1caad48
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions bahmnicore-omod/src/main/resources/liquibase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4652,7 +4652,7 @@
</sql>
</changeSet>
<include file="addAtomfeedMigrations.xml"/>
<changeSet id="manage-patient-program-attribute-types-202310191155" author="Bindu">
<changeSet id="manage-patient-program-attribute-types-202310191156" author="Bindu">
<preConditions>
<sqlCheck expectedResult="1">
select count(*) from privilege where privilege = 'Manage Program Attribute Types';
Expand All @@ -4664,9 +4664,8 @@
<comment>Adding Manage Patient Program Attribute Types privilege</comment>
<sql>

delete from privilege where privilege = 'Manage Program Attribute Types';

delete from role_privilege where privilege = 'Manage Program Attribute Types';
delete from privilege where privilege = 'Manage Program Attribute Types';

set @uuid = '';
select uuid() into @uuid;
Expand All @@ -4678,7 +4677,7 @@
insert ignore into role_privilege values('SuperAdmin', 'Manage Patient Program Attribute Types');
</sql>
</changeSet>
<changeSet id="get-patient-program-attribute-types-202310191511" author="Bindu">
<changeSet id="get-patient-program-attribute-types-202310191512" author="Bindu">
<preConditions>
<sqlCheck expectedResult="1">
select count(*) from privilege where privilege = 'View Program Attribute Types';
Expand All @@ -4690,9 +4689,8 @@
<comment>Adding Get Patient Program Attribute Types privilege</comment>
<sql>

delete from privilege where privilege = 'View Program Attribute Types';

delete from role_privilege where privilege = 'View Program Attribute Types';
delete from privilege where privilege = 'View Program Attribute Types';

set @uuid = '';
select uuid() into @uuid;
Expand All @@ -4706,7 +4704,7 @@
</sql>
</changeSet>

<changeSet id="purge-patient-program-attribute-types-202310191514" author="Bindu">
<changeSet id="purge-patient-program-attribute-types-202310191515" author="Bindu">
<preConditions>
<sqlCheck expectedResult="1">
select count(*) from privilege where privilege = 'Purge Program Attribute Types';
Expand All @@ -4718,9 +4716,8 @@
<comment>Adding Get Patient Program Attribute Types privilege</comment>
<sql>

delete from privilege where privilege = 'Purge Program Attribute Types';

delete from role_privilege where privilege = 'Purge Program Attribute Types';
delete from privilege where privilege = 'Purge Program Attribute Types';

set @uuid = '';
select uuid() into @uuid;
Expand Down

0 comments on commit 1caad48

Please sign in to comment.