Skip to content

Commit 4ce0a91

Browse files
committed
FINERACT-2081: Add index on calendar instance table
1 parent 53c2cab commit 4ce0a91

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,5 @@
185185
<include file="parts/0164_transaction_summary_with_asset_owner_report_accrual_adj_report_separately_and_exclude_accrual_activity.xml" relativeToChangelogFile="true" />
186186
<include file="parts/0165_add_credited_interest_to_instalment.xml" relativeToChangelogFile="true" />
187187
<include file="parts/0166_transaction_summary_with_asset_owner_report_charge_adjustment_fix.xml" relativeToChangelogFile="true" />
188+
<include file="parts/0167_create_m_calendar_instance_index.xml" relativeToChangelogFile="true" />
188189
</databaseChangeLog>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
21+
-->
22+
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
23+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
25+
<changeSet author="fineract" id="1" runInTransaction="false" context="postgresql">
26+
<preConditions onFail="MARK_RAN">
27+
<not>
28+
<indexExists tableName="m_calendar_instance" columnNames="entity_id, entity_type_enum"/>
29+
</not>
30+
</preConditions>
31+
<sql>
32+
create index concurrently idx_m_calendar_instance_entity_id_entity_type on m_calendar_instance(entity_id, entity_type_enum);
33+
</sql>
34+
</changeSet>
35+
36+
<changeSet author="fineract" id="1" runInTransaction="false" context="mysql">
37+
<preConditions onFail="MARK_RAN">
38+
<not>
39+
<indexExists tableName="m_calendar_instance" columnNames="entity_id, entity_type_enum"/>
40+
</not>
41+
</preConditions>
42+
<createIndex indexName="idx_m_calendar_instance_entity_id_entity_type" tableName="m_calendar_instance">
43+
<column name="entity_id"/>
44+
<column name="entity_type_enum"/>
45+
</createIndex>
46+
</changeSet>
47+
48+
</databaseChangeLog>

0 commit comments

Comments
 (0)