Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,5 @@
<include file="parts/0207_add_allow_full_term_for_tranche.xml" relativeToChangelogFile="true" />
<include file="parts/0208_trial_balance_summary_with_asset_owner_journal_entry_aggregation_fix.xml" relativeToChangelogFile="true" />
<include file="parts/0209_transaction_summary_with_asset_owner_and_from_asset_owner_id_for_asset_sales.xml" relativeToChangelogFile="true" />
<include file="parts/0210_remove_pentaho_reports.xml" relativeToChangelogFile="true" />
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?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.
<!-- Step 1: Delete child records from m_role_permission first -->
<changeSet author="fineract" id="1">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="1">
SELECT COUNT(*) > 0
FROM m_role_permission rp
JOIN m_permission p ON p.id = rp.permission_id
WHERE p.code LIKE '%Pentaho%'
</sqlCheck>
</preConditions>
<comment>Remove role permissions referencing deprecated Pentaho report permissions</comment>
<delete tableName="m_role_permission">
<where>permission_id IN (SELECT id FROM m_permission WHERE code LIKE '%Pentaho%')</where>
</delete>
</changeSet>

<!-- Step 2: Delete parent records from m_permission -->
<changeSet author="fineract" id="2">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="1">SELECT COUNT(*) > 0 FROM m_permission WHERE code LIKE '%Pentaho%'</sqlCheck>
</preConditions>
<comment>Remove deprecated Pentaho report permissions</comment>
<delete tableName="m_permission">
<where>code LIKE '%Pentaho%'</where>
</delete>
</changeSet>

<!-- Step 3: Delete Pentaho reports from stretchy_report -->
<changeSet author="fineract" id="3">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="1">SELECT COUNT(*) > 0 FROM stretchy_report WHERE report_name LIKE '%Pentaho%'</sqlCheck>
</preConditions>
<comment>Remove deprecated Pentaho reports from stretchy_report table</comment>
<delete tableName="stretchy_report">
<where>report_name LIKE '%Pentaho%'</where>
</delete>
</changeSet>
</databaseChangeLog>
Loading
Loading