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,149 @@
<?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.3.xsd">
<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 LOWER(p.code) LIKE LOWER('%Pentaho%')
</sqlCheck>
</preConditions>
<comment>Remove role permissions for deprecated Pentaho reports</comment>
<sql>
DELETE FROM m_role_permission
WHERE permission_id IN (SELECT id FROM m_permission WHERE LOWER(code) LIKE LOWER('%Pentaho%'));
</sql>
</changeSet>
<changeSet author="fineract" id="2">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="1">
SELECT COUNT(*) > 0 FROM m_permission WHERE LOWER(code) LIKE LOWER('%Pentaho%')
</sqlCheck>
</preConditions>
<comment>Remove deprecated Pentaho report permissions</comment>
<sql>
DELETE FROM m_permission WHERE code IN (
'READ_Active Loans - Summary(Pentaho)',
'READ_Active Loans by Disbursal Period(Pentaho)',
'READ_Active Loans in last installment Summary(Pentaho)',
'READ_Active Loans in last installment(Pentaho)',
'READ_Active Loans Passed Final Maturity Summary(Pentaho)',
'READ_Active Loans Passed Final Maturity(Pentaho)',
'READ_Aging Detail(Pentaho)',
'READ_Aging Summary (Arrears in Months)(Pentaho)',
'READ_Aging Summary (Arrears in Weeks)(Pentaho)',
'READ_Client Listing(Pentaho)',
'READ_Client Loans Listing(Pentaho)',
'READ_Expected Payments By Date - Basic(Pentaho)',
'READ_Funds Disbursed Between Dates Summary by Office(Pentaho)',
'READ_Funds Disbursed Between Dates Summary(Pentaho)',
'READ_Loans Awaiting Disbursal Summary by Month(Pentaho)',
'READ_Loans Awaiting Disbursal Summary(Pentaho)',
'READ_Loans Awaiting Disbursal(Pentaho)',
'READ_Loans Pending Approval(Pentaho)',
'READ_Obligation Met Loans Details(Pentaho)',
'READ_Obligation Met Loans Summary(Pentaho)',
'READ_Portfolio at Risk by Branch(Pentaho)',
'READ_Portfolio at Risk(Pentaho)',
'READ_Rescheduled Loans(Pentaho)',
'READ_TxnRunningBalances(Pentaho)',
'READ_Written-Off Loans(Pentaho)',
'READ_Staff Assignment History'
);
</sql>
</changeSet>
<changeSet author="fineract" id="3">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="1">
SELECT COUNT(*) > 0
FROM stretchy_report_parameter
WHERE report_id IN (SELECT id FROM stretchy_report WHERE LOWER(report_type) = LOWER('Pentaho'))
</sqlCheck>
</preConditions>
<comment>Remove parameters for deprecated Pentaho reports</comment>
<sql>
DELETE FROM stretchy_report_parameter
WHERE report_id IN (SELECT id FROM stretchy_report WHERE LOWER(report_type) = LOWER('Pentaho'));
</sql>
</changeSet>
<changeSet author="fineract" id="4">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="1">
SELECT COUNT(*) > 0 FROM stretchy_report WHERE LOWER(report_type) = LOWER('Pentaho')
</sqlCheck>
</preConditions>
<comment>Remove deprecated Pentaho reports from stretchy_report</comment>
<sql>
DELETE FROM stretchy_report WHERE report_name IN (
'Balance Sheet',
'Income Statement',
'Trial Balance',
'Loan Account Schedule',
'Branch Expected Cash Flow',
'Expected Payments By Date - Formatted',
'Savings Transactions',
'Client Savings Summary',
'Active Loans - Details(Pentaho)',
'Active Loans - Summary(Pentaho)',
'Active Loans by Disbursal Period(Pentaho)',
'Active Loans in last installment Summary(Pentaho)',
'Active Loans in last installment(Pentaho)',
'Active Loans Passed Final Maturity Summary(Pentaho)',
'Active Loans Passed Final Maturity(Pentaho)',
'Aging Detail(Pentaho)',
'Aging Summary (Arrears in Months)(Pentaho)',
'Aging Summary (Arrears in Weeks)(Pentaho)',
'Client Listing(Pentaho)',
'Client Loans Listing(Pentaho)',
'Expected Payments By Date - Basic(Pentaho)',
'Funds Disbursed Between Dates Summary by Office(Pentaho)',
'Funds Disbursed Between Dates Summary(Pentaho)',
'Loans Awaiting Disbursal Summary by Month(Pentaho)',
'Loans Awaiting Disbursal Summary(Pentaho)',
'Loans Awaiting Disbursal(Pentaho)',
'Loans Pending Approval(Pentaho)',
'Obligation Met Loans Details(Pentaho)',
'Obligation Met Loans Summary(Pentaho)',
'Portfolio at Risk by Branch(Pentaho)',
'Portfolio at Risk(Pentaho)',
'Rescheduled Loans(Pentaho)',
'TxnRunningBalances(Pentaho)',
'Written-Off Loans(Pentaho)',
'Client Saving Transactions',
'Client Loan Account Schedule',
'Savings Transaction Receipt',
'Loan Transaction Receipt',
'Staff Assignment History',
'GeneralLedgerReport',
'Active Loan Summary per Branch',
'Balance Outstanding',
'Collection Report',
'Disbursal Report'
) AND LOWER(report_type) = LOWER('Pentaho');
</sql>
</changeSet>
</databaseChangeLog>
Loading