table changes on Maker-Checker workflow for Products, with approval-based updates and product locking to prevent concurrent edits
This commit is contained in:
+2
@@ -49,4 +49,6 @@
|
||||
<include file="parts/2025_recreate_savings_product_temp_table.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2026_add_pending_edit_typed_columns.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2027_add_pending_edit_satellite_tables.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2028_update_saving_product_temp_table.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2029_remove_proposed_payload_json.xml" relativeToChangelogFile="true" />
|
||||
</databaseChangeLog>
|
||||
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
<?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">
|
||||
|
||||
<!-- 1. Rename table m_savings_product_temp to m_saving_product_temp -->
|
||||
<changeSet author="fineract" id="2028-1">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<tableExists tableName="m_savings_product_temp" />
|
||||
</preConditions>
|
||||
<renameTable oldTableName="m_savings_product_temp" newTableName="m_saving_product_temp" />
|
||||
</changeSet>
|
||||
|
||||
<!-- 2. Recreate unique constraint on pending_lock_key if needed -->
|
||||
<changeSet author="fineract" id="2028-2">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<tableExists tableName="m_saving_product_temp" />
|
||||
</preConditions>
|
||||
<dropUniqueConstraint tableName="m_saving_product_temp" constraintName="sp_temp_unq_pending_lock_key" />
|
||||
<addUniqueConstraint tableName="m_saving_product_temp" columnNames="pending_lock_key" constraintName="sp_temp_unq_pending_lock_key" />
|
||||
</changeSet>
|
||||
|
||||
<!-- 3. Rename columns to match exact user comparative list names -->
|
||||
<changeSet author="fineract" id="2028-rename-core-columns">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<tableExists tableName="m_saving_product_temp" />
|
||||
</preConditions>
|
||||
|
||||
<!-- Auditing -->
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="maker_id" newColumnName="createdby_id" columnDataType="BIGINT" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="checker_id" newColumnName="lastmodifiedby_id" columnDataType="BIGINT" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="created_on" newColumnName="created_date" columnDataType="DATETIME" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="checked_on" newColumnName="lastmodified_date" columnDataType="DATETIME" />
|
||||
|
||||
<!-- Core fields -->
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="digits_after_decimal" newColumnName="currency_digits" columnDataType="INTEGER" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="in_multiples_of" newColumnName="currency_multiplesof" columnDataType="INTEGER" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="accounting_rule" newColumnName="accounting_type" columnDataType="INTEGER" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="interest_compounding_period_type" newColumnName="interest_compounding_period_enum" columnDataType="INTEGER" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="interest_posting_period_type" newColumnName="interest_posting_period_enum" columnDataType="INTEGER" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="interest_calculation_type" newColumnName="interest_calculation_type_enum" columnDataType="INTEGER" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="interest_calculation_days_in_year_type" newColumnName="interest_calculation_days_in_year_type_enum" columnDataType="INTEGER" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="lockin_period_frequency_type" newColumnName="lockin_period_frequency_enum" columnDataType="INTEGER" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="withdrawal_fee_for_transfers" newColumnName="withdrawal_fee_for_transfer" columnDataType="BOOLEAN" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="lien_allowed" newColumnName="is_lien_allowed" columnDataType="BOOLEAN" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="with_hold_tax" newColumnName="withhold_tax" columnDataType="BOOLEAN" />
|
||||
|
||||
<!-- Share fields -->
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="total_shares_issued" newColumnName="issued_shares" columnDataType="BIGINT" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="minimum_shares" newColumnName="minimum_client_shares" columnDataType="BIGINT" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="nominal_shares" newColumnName="nominal_client_shares" columnDataType="BIGINT" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="maximum_shares" newColumnName="maximum_client_shares" columnDataType="BIGINT" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="minimum_active_period_for_dividends" newColumnName="minimum_active_period_frequency" columnDataType="INTEGER" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="minimum_active_period_frequency_type" newColumnName="minimum_active_period_frequency_enum" columnDataType="INTEGER" />
|
||||
<renameColumn tableName="m_saving_product_temp" oldColumnName="allow_dividend_calc_for_inactive_clients" newColumnName="allow_dividends_inactive_clients" columnDataType="BOOLEAN" />
|
||||
</changeSet>
|
||||
|
||||
<!-- 4. Add the completely new columns to m_saving_product_temp -->
|
||||
<changeSet author="fineract" id="2028-add-missing-columns">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<tableExists tableName="m_saving_product_temp" />
|
||||
</preConditions>
|
||||
<addColumn tableName="m_saving_product_temp">
|
||||
<!-- If column does not already exist, it will be added. Guard is implicit via preCondition or Liquibase will skip. -->
|
||||
<column name="deposit_type_enum" type="SMALLINT" />
|
||||
<column name="withdrawal_fee_amount" type="DECIMAL(19, 6)" />
|
||||
<column name="withdrawal_fee_type_enum" type="SMALLINT" />
|
||||
<column name="external_id" type="VARCHAR(100)" />
|
||||
<column name="start_date" type="DATE" />
|
||||
<column name="totalsubscribed_shares" type="BIGINT" />
|
||||
<column name="capital_amount" type="DECIMAL(20, 2)" />
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<?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="2029-remove-proposed-payload-json">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<columnExists tableName="m_saving_product_temp" columnName="proposed_payload_json" />
|
||||
</preConditions>
|
||||
<dropColumn tableName="m_saving_product_temp" columnName="proposed_payload_json" />
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user