Skip to content

Commit

Permalink
FINERACT-1926: Additional indices to investor tables
Browse files Browse the repository at this point in the history
  • Loading branch information
magyari-adam authored and galovics committed Dec 3, 2024
1 parent af34f31 commit 5c08afe
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@
<include relativeToChangelogFile="true" file="parts/0010_external_transafer_status_external_transfer_id_constraints.xml"/>
<include relativeToChangelogFile="true" file="parts/0011_set_datetime_precision.xml"/>
<include relativeToChangelogFile="true" file="parts/0012_add_external_asset_owner_transfer_index.xml"/>
<include relativeToChangelogFile="true" file="parts/0013_add_additional_asset_owner_indices.xml"/>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?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
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">

<changeSet author="fineract" id="1" runInTransaction="false" context="postgresql">
<preConditions onFail="MARK_RAN">
<not>
<indexExists tableName="m_external_asset_owner_transfer_loan_mapping" columnNames="owner_transfer_id"/>
</not>
</preConditions>
<sql>
create index concurrently IDX_e_asset_o_transfer_loan_mapping_owner_transfer_id on m_external_asset_owner_transfer_loan_mapping(owner_transfer_id);
</sql>
</changeSet>

<changeSet author="fineract" id="2" runInTransaction="false" context="postgresql">
<preConditions onFail="MARK_RAN">
<not>
<indexExists tableName="m_external_asset_owner_transfer_journal_entry_mapping" columnNames="owner_transfer_id"/>
</not>
</preConditions>
<sql>
create index concurrently IDX_e_asset_o_transfer_journal_entry_mapping_owner_transfer_id on m_external_asset_owner_transfer_journal_entry_mapping(owner_transfer_id);
</sql>
</changeSet>

<changeSet author="fineract" id="3" runInTransaction="false" context="postgresql">
<preConditions onFail="MARK_RAN">
<not>
<indexExists tableName="m_external_asset_owner_transfer_journal_entry_mapping" columnNames="journal_entry_id"/>
</not>
</preConditions>
<sql>
create index concurrently IDX_e_asset_o_transfer_journal_entry_mapping_journal_entry_id on m_external_asset_owner_transfer_journal_entry_mapping(journal_entry_id);
</sql>
</changeSet>

<changeSet author="fineract" id="4" runInTransaction="false" context="postgresql">
<preConditions onFail="MARK_RAN">
<not>
<indexExists tableName="m_external_asset_owner_journal_entry_mapping" columnNames="journal_entry_id"/>
</not>
</preConditions>
<sql>
create index concurrently IDX_e_asset_o_journal_entry_mapping_journal_entry_id on m_external_asset_owner_journal_entry_mapping(journal_entry_id);
</sql>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,5 @@
<include file="parts/0154_add_interest_refund_to_r_enum_value.xml" relativeToChangelogFile="true" />
<include file="parts/0155_add_configuration_enable_immediate_charge_accrual_post_maturity.xml" relativeToChangelogFile="true" />
<include file="parts/0156_add_disallow_interest_calc_on_past_due_field.xml" relativeToChangelogFile="true" />
<include file="parts/0157_create_index_m_loan_transaction_relation.xml" relativeToChangelogFile="true" />
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?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
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">

<changeSet author="fineract" id="1" runInTransaction="false" context="postgresql">
<preConditions onFail="MARK_RAN">
<not>
<indexExists tableName="m_loan_transaction_relation" columnNames="to_loan_transaction_id"/>
</not>
</preConditions>
<sql>
create index concurrently IDX_M_LOAN_TRANSACTION_RELATION_TO_LOAN_TRANSACTION_ID on m_loan_transaction_relation(to_loan_transaction_id);
</sql>
</changeSet>
<changeSet author="fineract" id="2" runInTransaction="false" context="postgresql">
<preConditions onFail="MARK_RAN">
<not>
<indexExists tableName="m_loan_transaction_relation" columnNames="to_loan_charge_id"/>
</not>
</preConditions>
<sql>
create index concurrently IDX_M_LOAN_TRANSACTION_RELATION_TO_LOAN_CHARGE_ID on m_loan_transaction_relation(to_loan_charge_id);
</sql>
</changeSet>
</databaseChangeLog>

0 comments on commit 5c08afe

Please sign in to comment.