Skip to content

Commit 334da61

Browse files
committed
FINERACT-2348: Add missing indexes
1 parent 89e9cfc commit 334da61

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

fineract-provider/src/main/resources/db/changelog/tenant/parts/0195_create_loan_amortization_allocation_mapping.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,64 @@
104104
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
105105
referencedTableName="m_loan_transaction" validate="true"/>
106106
</changeSet>
107+
<changeSet id="4" author="fineract" context="postgresql" runInTransaction="false">
108+
<preConditions onFail="MARK_RAN">
109+
<not>
110+
<indexExists tableName="m_loan_amortization_allocation_mapping" columnNames="loan_id"/>
111+
</not>
112+
</preConditions>
113+
<sql>
114+
create index concurrently idx_m_loan_am_all_map_base_loan_id on m_loan_amortization_allocation_mapping(loan_id);
115+
</sql>
116+
</changeSet>
117+
<changeSet id="5" author="fineract" context="mysql" runInTransaction="false">
118+
<preConditions onFail="MARK_RAN">
119+
<not>
120+
<indexExists tableName="m_loan_amortization_allocation_mapping" columnNames="loan_id"/>
121+
</not>
122+
</preConditions>
123+
<sql>
124+
create index idx_m_loan_am_all_map_base_loan_id on batch_step_execution(loan_id);
125+
</sql>
126+
</changeSet>
127+
<changeSet id="6" author="fineract" context="postgresql" runInTransaction="false">
128+
<preConditions onFail="MARK_RAN">
129+
<not>
130+
<indexExists tableName="m_loan_amortization_allocation_mapping" columnNames="base_loan_transaction_id"/>
131+
</not>
132+
</preConditions>
133+
<sql>
134+
create index concurrently idx_m_loan_am_all_map_base_loan_txn_id on m_loan_amortization_allocation_mapping(base_loan_transaction_id);
135+
</sql>
136+
</changeSet>
137+
<changeSet id="7" author="fineract" context="mysql" runInTransaction="false">
138+
<preConditions onFail="MARK_RAN">
139+
<not>
140+
<indexExists tableName="m_loan_amortization_allocation_mapping" columnNames="base_loan_transaction_id"/>
141+
</not>
142+
</preConditions>
143+
<sql>
144+
create index idx_m_loan_am_all_map_base_loan_txn_id on batch_step_execution(base_loan_transaction_id);
145+
</sql>
146+
</changeSet>
147+
<changeSet id="8" author="fineract" context="postgresql" runInTransaction="false">
148+
<preConditions onFail="MARK_RAN">
149+
<not>
150+
<indexExists tableName="m_loan_amortization_allocation_mapping" columnNames="amortization_loan_transaction_id"/>
151+
</not>
152+
</preConditions>
153+
<sql>
154+
create index concurrently idx_m_loan_am_all_map_amort_loan_txn_id on m_loan_amortization_allocation_mapping(amortization_loan_transaction_id);
155+
</sql>
156+
</changeSet>
157+
<changeSet id="9" author="fineract" context="mysql" runInTransaction="false">
158+
<preConditions onFail="MARK_RAN">
159+
<not>
160+
<indexExists tableName="m_loan_amortization_allocation_mapping" columnNames="amortization_loan_transaction_id"/>
161+
</not>
162+
</preConditions>
163+
<sql>
164+
create index idx_m_loan_am_all_map_amort_loan_txn_id on batch_step_execution(amortization_loan_transaction_id);
165+
</sql>
166+
</changeSet>
107167
</databaseChangeLog>

0 commit comments

Comments
 (0)