This is an automated email from the ASF dual-hosted git repository.
adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new 25ef93a30b FINERACT-2181: Add missing index for `transaction_id` field
of `acc_gl_journal_entry` table
25ef93a30b is described below
commit 25ef93a30b407d645350505126ce065451a6e2c7
Author: Adam Saghy <[email protected]>
AuthorDate: Fri May 23 17:04:51 2025 +0200
FINERACT-2181: Add missing index for `transaction_id` field of
`acc_gl_journal_entry` table
---
.../db/changelog/tenant/changelog-tenant.xml | 1 +
.../tenant/parts/0177_acc_journal_entry_index.xml | 48 ++++++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git
a/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
b/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
index bfb36e98fc..61fb03607e 100644
---
a/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
+++
b/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
@@ -195,4 +195,5 @@
<include file="parts/0174_loan_product_add_capitalized_income_type.xml"
relativeToChangelogFile="true" />
<include file="parts/0175_add_fk_acc_product_mapping.xml"
relativeToChangelogFile="true" />
<include
file="parts/0176_add_capitalized_income_amortization_transaction.xml"
relativeToChangelogFile="true" />
+ <include file="parts/0177_acc_journal_entry_index.xml"
relativeToChangelogFile="true" />
</databaseChangeLog>
diff --git
a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0177_acc_journal_entry_index.xml
b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0177_acc_journal_entry_index.xml
new file mode 100644
index 0000000000..398a2b8f46
--- /dev/null
+++
b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0177_acc_journal_entry_index.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
+ <changeSet author="fineract" id="1" runInTransaction="false"
context="postgresql">
+ <preConditions onFail="MARK_RAN">
+ <sqlCheck expectedResult="0">
+ SELECT COUNT(*) FROM pg_indexes WHERE
tablename='acc_gl_journal_entry' and
indexname='idx_acc_gl_journal_entry_transaction_id';
+ </sqlCheck>
+ </preConditions>
+ <sql>
+ CREATE INDEX CONCURRENTLY idx_acc_gl_journal_entry_transaction_id
ON acc_gl_journal_entry(transaction_id);
+ </sql>
+ </changeSet>
+ <changeSet author="fineract" id="2-mysql" runInTransaction="false"
context="mysql">
+ <preConditions onFail="MARK_RAN">
+ <sqlCheck expectedResult="0">
+ SELECT COUNT(*) FROM information_schema.statistics
+ WHERE table_schema = DATABASE()
+ AND table_name = 'acc_gl_journal_entry'
+ AND index_name = 'idx_acc_gl_journal_entry_transaction_id';
+ </sqlCheck>
+ </preConditions>
+ <sql>
+ CREATE INDEX idx_acc_gl_journal_entry_transaction_id ON
acc_gl_journal_entry(transaction_id);
+ </sql>
+ </changeSet>
+</databaseChangeLog>