blob: 97c96088b187ff33a47d2cfd33c8daaa7791df91 [file] [log] [blame]
<?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">
<createTable tableName="acc_accounting_rule">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column defaultValueComputed="NULL" name="office_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="debit_account_id" type="BIGINT"/>
<column defaultValueBoolean="false" name="allow_multiple_debits" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="credit_account_id" type="BIGINT"/>
<column defaultValueBoolean="false" name="allow_multiple_credits" type="boolean">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(500)"/>
<column defaultValueBoolean="false" name="system_defined" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="2">
<createTable tableName="acc_gl_account">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(200)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="parent_id" type="BIGINT"/>
<column name="hierarchy" type="VARCHAR(50)"/>
<column name="gl_code" type="VARCHAR(45)">
<constraints nullable="false" unique="true"/>
</column>
<column defaultValueBoolean="false" name="disabled" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="manual_journal_entries_allowed" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="2" name="account_usage" type="TINYINT">
<constraints nullable="false"/>
</column>
<column name="classification_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="tag_id" type="INT"/>
<column name="description" type="VARCHAR(500)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="3">
<createTable tableName="acc_gl_closure">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="closing_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_deleted" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column name="comments" type="VARCHAR(500)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="4">
<createTable tableName="acc_gl_financial_activity_account">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0" name="gl_account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="financial_activity_type" type="SMALLINT">
<constraints nullable="false" unique="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="5">
<createTable tableName="acc_gl_journal_entry">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="reversal_id" type="BIGINT"/>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column name="transaction_id" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="loan_transaction_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="savings_transaction_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="client_transaction_id" type="BIGINT"/>
<column defaultValueBoolean="false" name="reversed" type="boolean">
<constraints nullable="false"/>
</column>
<column name="ref_num" type="VARCHAR(100)"/>
<column defaultValueBoolean="false" name="manual_entry" type="boolean">
<constraints nullable="false"/>
</column>
<column name="entry_date" type="date">
<constraints nullable="false"/>
</column>
<column name="type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(500)"/>
<column defaultValueComputed="NULL" name="entity_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="entity_id" type="BIGINT"/>
<column name="createdby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="lastmodifiedby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created_date" type="datetime">
<constraints nullable="false"/>
</column>
<column name="lastmodified_date" type="datetime">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_running_balance_calculated" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="office_running_balance" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="organization_running_balance" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="payment_details_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="share_transaction_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="transaction_date" type="date"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="6">
<createTable tableName="acc_product_mapping">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="gl_account_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="product_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="product_type" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="payment_type" type="INT"/>
<column defaultValueComputed="NULL" name="charge_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="financial_account_type" type="SMALLINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="7">
<createTable tableName="acc_rule_tags">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="acc_rule_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="tag_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="acc_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="8">
<createTable tableName="c_account_number_format">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="account_type_enum" type="SMALLINT">
<constraints nullable="false" unique="true"/>
</column>
<column defaultValueComputed="NULL" name="prefix_type_enum" type="SMALLINT"/>
<column name="prefix_character" type="VARCHAR(50)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="9">
<createTable tableName="c_cache">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="1" name="cache_type_enum" type="TINYINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="10">
<createTable tableName="c_configuration">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column defaultValueComputed="NULL" name="value" type="INT"/>
<column defaultValueComputed="NULL" name="date_value" type="date"/>
<column name="string_value" type="VARCHAR(100)"/>
<column defaultValueBoolean="false" name="enabled" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_trap_door" type="boolean">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(300)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="11">
<createTable tableName="c_external_service">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="12">
<createTable tableName="c_external_service_properties">
<column name="name" type="VARCHAR(150)">
<constraints nullable="false"/>
</column>
<column name="value" type="VARCHAR(250)"/>
<column name="external_service_id" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="13">
<createTable tableName="client_device_registration">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false" unique="true"/>
</column>
<column name="updatedon_date" type="datetime">
<constraints nullable="false"/>
</column>
<column name="registration_id" type="VARCHAR(255)">
<constraints nullable="false" unique="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="14">
<createTable tableName="glim_accounts">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0" name="group_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="account_number" type="VARCHAR(50)">
<constraints nullable="false" unique="true"/>
</column>
<column defaultValueNumeric="0.000000" name="principal_amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="child_accounts_count" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="accepting_child" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="loan_status_id" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="application_id" type="DECIMAL(10)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="15">
<createTable tableName="gsim_accounts">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0" name="group_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="account_number" type="VARCHAR(50)">
<constraints nullable="false" unique="true"/>
</column>
<column defaultValueNumeric="0.000000" name="parent_deposit" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="child_accounts_count" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="accepting_child" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="savings_status_id" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="application_id" type="DECIMAL(10)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="16">
<createTable tableName="interop_identifier">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="type" type="VARCHAR(32)">
<constraints nullable="false"/>
</column>
<column name="a_value" type="VARCHAR(128)">
<constraints nullable="false"/>
</column>
<column name="sub_value_or_type" type="VARCHAR(128)"/>
<column name="created_by" type="VARCHAR(32)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="current_timestamp()" name="created_on" type="timestamp">
<constraints nullable="false"/>
</column>
<column name="modified_by" type="VARCHAR(32)"/>
<column defaultValueComputed="NULL" name="modified_on" type="timestamp"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="17">
<createTable tableName="job">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="display_name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="cron_expression" type="VARCHAR(20)">
<constraints nullable="false"/>
</column>
<column name="create_time" type="datetime">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="5" name="task_priority" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="group_name" type="VARCHAR(50)"/>
<column defaultValueComputed="NULL" name="previous_run_start_time" type="datetime"/>
<column defaultValueComputed="NULL" name="next_run_time" type="datetime"/>
<column name="job_key" type="VARCHAR(500)"/>
<column name="initializing_errorlog" type="TEXT"/>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="currently_running" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="updates_allowed" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="scheduler_group" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_misfired" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="node_id" type="INT"/>
<column defaultValueBoolean="true" name="is_mismatched_job" type="boolean"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="18">
<createTable tableName="job_parameters">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="job_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="parameter_name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="parameter_value" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="19">
<createTable tableName="job_run_history">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="job_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="version" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="start_time" type="datetime">
<constraints nullable="false"/>
</column>
<column name="end_time" type="datetime">
<constraints nullable="false"/>
</column>
<column name="status" type="VARCHAR(10)">
<constraints nullable="false"/>
</column>
<column name="error_message" type="TEXT"/>
<column name="trigger_type" type="VARCHAR(25)">
<constraints nullable="false"/>
</column>
<column name="error_log" type="TEXT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="20">
<createTable tableName="m_account_transfer_details">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="from_office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="to_office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="from_client_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="to_client_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="from_savings_account_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="to_savings_account_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="from_loan_account_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="to_loan_account_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="transfer_type" type="SMALLINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="21">
<createTable tableName="m_account_transfer_standing_instructions">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(250)">
<constraints nullable="false" unique="true"/>
</column>
<column name="account_transfer_details_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="priority" type="TINYINT">
<constraints nullable="false"/>
</column>
<column name="status" type="TINYINT">
<constraints nullable="false"/>
</column>
<column name="instruction_type" type="TINYINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="amount" type="DECIMAL(19, 6)"/>
<column name="valid_from" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="valid_till" type="date"/>
<column name="recurrence_type" type="TINYINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="recurrence_frequency" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="recurrence_interval" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="recurrence_on_day" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="recurrence_on_month" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="last_run_date" type="date"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="22">
<createTable tableName="m_account_transfer_standing_instructions_history">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="standing_instruction_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="status" type="VARCHAR(20)">
<constraints nullable="false"/>
</column>
<column name="execution_time" type="datetime">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="error_log" type="VARCHAR(500)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="23">
<createTable tableName="m_account_transfer_transaction">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="account_transfer_details_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="from_savings_transaction_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="from_loan_transaction_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="to_savings_transaction_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="to_loan_transaction_id" type="BIGINT"/>
<column name="is_reversed" type="boolean">
<constraints nullable="false"/>
</column>
<column name="transaction_date" type="date">
<constraints nullable="false"/>
</column>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column name="currency_digits" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="currency_multiplesof" type="SMALLINT"/>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(200)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="24">
<createTable tableName="m_address">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="street" type="VARCHAR(100)"/>
<column name="address_line_1" type="VARCHAR(100)"/>
<column name="address_line_2" type="VARCHAR(100)"/>
<column name="address_line_3" type="VARCHAR(100)"/>
<column name="town_village" type="VARCHAR(100)"/>
<column name="city" type="VARCHAR(100)"/>
<column name="county_district" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="state_province_id" type="INT"/>
<column defaultValueComputed="NULL" name="country_id" type="INT"/>
<column name="postal_code" type="VARCHAR(10)"/>
<column defaultValueNumeric="0E-8" name="latitude" type="DECIMAL(10, 8)"/>
<column defaultValueNumeric="0E-8" name="longitude" type="DECIMAL(10, 8)"/>
<column name="created_by" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="created_on" type="date"/>
<column name="updated_by" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="updated_on" type="date"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="25">
<createTable tableName="m_adhoc">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)"/>
<column name="query" type="VARCHAR(2000)"/>
<column name="table_name" type="VARCHAR(100)"/>
<column name="table_fields" type="VARCHAR(1000)"/>
<column name="email" type="VARCHAR(500)"/>
<column defaultValueBoolean="false" name="IsActive" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column name="createdby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="lastmodifiedby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column defaultValueComputed="NULL" name="report_run_frequency_code" type="INT"/>
<column defaultValueComputed="NULL" name="report_run_every" type="INT"/>
<column defaultValueComputed="NULL" name="last_run" type="timestamp"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="26">
<createTable tableName="m_appuser">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueBoolean="false" name="is_deleted" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="office_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="staff_id" type="BIGINT"/>
<column name="username" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="firstname" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="lastname" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="password" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="email" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="firsttime_login_remaining" type="boolean">
<constraints nullable="false"/>
</column>
<column name="nonexpired" type="boolean">
<constraints nullable="false"/>
</column>
<column name="nonlocked" type="boolean">
<constraints nullable="false"/>
</column>
<column name="nonexpired_credentials" type="boolean">
<constraints nullable="false"/>
</column>
<column name="enabled" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueDate="1970-01-01" name="last_time_password_updated" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="password_never_expires"
remarks="define if the password, should be check for validity period or not" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_self_service_user" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="cannot_change_password" type="boolean"/>
</createTable>
<addUniqueConstraint columnNames="username" constraintName="username_org" tableName="m_appuser"/>
</changeSet>
<changeSet author="fineract" id="27">
<createTable tableName="m_appuser_previous_password">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="user_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="password" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="removal_date" type="date">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="28">
<createTable tableName="m_appuser_role">
<column name="appuser_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="role_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="29">
<createTable tableName="m_calendar">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="title" type="VARCHAR(70)">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(100)"/>
<column name="location" type="VARCHAR(50)"/>
<column name="start_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="end_date" type="date"/>
<column defaultValueComputed="NULL" name="duration" type="SMALLINT"/>
<column name="calendar_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="repeating" type="boolean">
<constraints nullable="false"/>
</column>
<column name="recurrence" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="remind_by_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="first_reminder" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="second_reminder" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column defaultValueComputed="NULL" name="meeting_time" type="time"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="30">
<createTable tableName="m_calendar_history">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="calendar_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="title" type="VARCHAR(70)">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(100)"/>
<column name="location" type="VARCHAR(50)"/>
<column name="start_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="end_date" type="date"/>
<column defaultValueComputed="NULL" name="duration" type="SMALLINT"/>
<column name="calendar_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="repeating" type="boolean">
<constraints nullable="false"/>
</column>
<column name="recurrence" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="remind_by_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="first_reminder" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="second_reminder" type="SMALLINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="31">
<createTable tableName="m_calendar_instance">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="calendar_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="entity_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="entity_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="32">
<createTable tableName="m_cashier_transactions">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="cashier_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="txn_type" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="txn_amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="txn_date" type="date">
<constraints nullable="false"/>
</column>
<column name="created_date" type="datetime">
<constraints nullable="false"/>
</column>
<column name="entity_type" type="VARCHAR(50)"/>
<column defaultValueComputed="NULL" name="entity_id" type="BIGINT"/>
<column name="txn_note" type="VARCHAR(200)"/>
<column name="currency_code" type="VARCHAR(3)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="33">
<createTable tableName="m_cashiers">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="staff_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="teller_id" type="BIGINT"/>
<column name="description" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="start_date" type="date"/>
<column defaultValueComputed="NULL" name="end_date" type="date"/>
<column name="start_time" type="VARCHAR(10)"/>
<column name="end_time" type="VARCHAR(10)"/>
<column defaultValueComputed="NULL" name="full_day" type="boolean"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="34">
<createTable tableName="m_charge">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column name="charge_applies_to_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="charge_time_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="charge_calculation_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="charge_payment_mode_enum" type="SMALLINT"/>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="fee_on_day" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="fee_interval" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="fee_on_month" type="SMALLINT"/>
<column defaultValueBoolean="false" name="is_penalty" type="boolean">
<constraints nullable="false"/>
</column>
<column name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_deleted" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="min_cap" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="max_cap" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="fee_frequency" type="SMALLINT"/>
<column defaultValueBoolean="false" name="is_free_withdrawal" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="free_withdrawal_charge_frequency" type="INT"/>
<column defaultValueNumeric="0" name="restart_frequency" type="INT"/>
<column defaultValueNumeric="0" name="restart_frequency_enum" type="INT"/>
<column defaultValueBoolean="false" name="is_payment_type" type="boolean"/>
<column defaultValueComputed="NULL" name="payment_type_id" type="INT"/>
<column defaultValueComputed="NULL" name="income_or_liability_account_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="tax_group_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="35">
<createTable tableName="m_client">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="account_no" type="VARCHAR(20)">
<constraints nullable="false" unique="true"/>
</column>
<column name="external_id" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column defaultValueNumeric="300" name="status_enum" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="sub_status" type="INT"/>
<column defaultValueComputed="NULL" name="activation_date" type="date"/>
<column defaultValueComputed="NULL" name="office_joining_date" type="date"/>
<column name="office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="transfer_to_office_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="staff_id" type="BIGINT"/>
<column name="firstname" type="VARCHAR(50)"/>
<column name="middlename" type="VARCHAR(50)"/>
<column name="lastname" type="VARCHAR(50)"/>
<column name="fullname" type="VARCHAR(100)"/>
<column name="display_name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="mobile_no" type="VARCHAR(50)">
<constraints unique="true"/>
</column>
<column defaultValueBoolean="false" name="is_staff" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="gender_cv_id" type="INT"/>
<column defaultValueComputed="NULL" name="date_of_birth" type="date"/>
<column defaultValueComputed="NULL" name="image_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="closure_reason_cv_id" type="INT"/>
<column defaultValueComputed="NULL" name="closedon_date" type="date"/>
<column defaultValueComputed="NULL" name="updated_by" type="BIGINT"/>
<column defaultValueComputed="NULL" name="updated_on" type="date"/>
<column defaultValueComputed="NULL" name="submittedon_date" type="date"/>
<column defaultValueComputed="NULL" name="submittedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="activatedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="closedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="default_savings_product" type="BIGINT"/>
<column defaultValueComputed="NULL" name="default_savings_account" type="BIGINT"/>
<column defaultValueComputed="NULL" name="client_type_cv_id" type="INT"/>
<column defaultValueComputed="NULL" name="client_classification_cv_id" type="INT"/>
<column defaultValueComputed="NULL" name="reject_reason_cv_id" type="INT"/>
<column defaultValueComputed="NULL" name="rejectedon_date" type="date"/>
<column defaultValueComputed="NULL" name="rejectedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="withdraw_reason_cv_id" type="INT"/>
<column defaultValueComputed="NULL" name="withdrawn_on_date" type="date"/>
<column defaultValueComputed="NULL" name="withdraw_on_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="reactivated_on_date" type="date"/>
<column defaultValueComputed="NULL" name="reactivated_on_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="legal_form_enum" type="INT"/>
<column defaultValueComputed="NULL" name="reopened_on_date" type="date"/>
<column defaultValueComputed="NULL" name="reopened_by_userid" type="BIGINT"/>
<column name="email_address" type="VARCHAR(150)"/>
<column defaultValueComputed="NULL" name="proposed_transfer_date" type="date"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="36">
<createTable tableName="m_client_address">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0" name="client_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="address_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="address_type_id" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="37">
<createTable tableName="m_client_attendance">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0" name="client_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="meeting_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="attendance_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="38">
<createTable tableName="m_client_charge">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="charge_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="is_penalty" type="boolean">
<constraints nullable="false"/>
</column>
<column name="charge_time_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="charge_due_date" type="date"/>
<column name="charge_calculation_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="amount_paid_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_waived_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_writtenoff_derived" type="DECIMAL(19, 6)"/>
<column name="amount_outstanding_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="is_paid_derived" type="boolean"/>
<column defaultValueComputed="NULL" name="waived" type="boolean"/>
<column defaultValueComputed="NULL" name="is_active" type="boolean"/>
<column defaultValueComputed="NULL" name="inactivated_on_date" type="date"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="39">
<createTable tableName="m_client_charge_paid_by">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="client_transaction_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="client_charge_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="40">
<createTable tableName="m_client_collateral_management">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="quantity" type="DECIMAL(20, 5)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="client_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="collateral_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="41">
<createTable tableName="m_client_identifier">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="document_type_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="document_key" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="300" name="status" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="active" type="INT"/>
<column name="description" type="VARCHAR(500)"/>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="42">
<createTable tableName="m_client_non_person">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false" unique="true"/>
</column>
<column name="constitution_cv_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="incorp_no" type="VARCHAR(50)"/>
<column defaultValueComputed="NULL" name="incorp_validity_till" type="datetime"/>
<column defaultValueComputed="NULL" name="main_business_line_cv_id" type="INT"/>
<column name="remarks" type="VARCHAR(150)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="43">
<createTable tableName="m_client_transaction">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="payment_detail_id" type="BIGINT"/>
<column name="is_reversed" type="boolean">
<constraints nullable="false"/>
</column>
<column name="external_id" type="VARCHAR(50)">
<constraints unique="true"/>
</column>
<column name="transaction_date" type="date">
<constraints nullable="false"/>
</column>
<column name="transaction_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="created_date" type="datetime">
<constraints nullable="false"/>
</column>
<column name="appuser_id" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="44">
<createTable tableName="m_client_transfer_details">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="from_office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="to_office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="proposed_transfer_date" type="date"/>
<column name="transfer_type" type="TINYINT">
<constraints nullable="false"/>
</column>
<column name="submitted_on" type="date">
<constraints nullable="false"/>
</column>
<column name="submitted_by" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="45">
<createTable tableName="m_code">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="code_name" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column defaultValueBoolean="false" name="is_system_defined" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="46">
<createTable tableName="m_code_value">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="code_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="code_value" type="VARCHAR(100)"/>
<column name="code_description" type="VARCHAR(500)"/>
<column defaultValueNumeric="0" name="order_position" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="code_score" type="INT"/>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_mandatory" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="47">
<createTable tableName="m_collateral_management">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="quality" type="VARCHAR(40)">
<constraints nullable="false"/>
</column>
<column name="base_price" type="DECIMAL(20, 5)">
<constraints nullable="false"/>
</column>
<column name="unit_type" type="VARCHAR(10)">
<constraints nullable="false"/>
</column>
<column name="pct_to_base" type="DECIMAL(20, 5)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="currency" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="48">
<createTable tableName="m_creditbureau">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="product" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="country" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="implementationKey" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="49">
<createTable tableName="m_creditbureau_configuration">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="configkey" type="VARCHAR(50)"/>
<column name="value" type="LONGTEXT"/>
<column defaultValueComputed="NULL" name="organisation_creditbureau_id" type="BIGINT"/>
<column name="description" type="VARCHAR(50)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="50">
<createTable tableName="m_creditbureau_loanproduct_mapping">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="organisation_creditbureau_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="loan_product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="is_creditcheck_mandatory" type="boolean"/>
<column defaultValueComputed="NULL" name="skip_creditcheck_in_failure" type="boolean"/>
<column defaultValueComputed="NULL" name="stale_period" type="INT"/>
<column defaultValueComputed="NULL" name="isActive" type="boolean"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="51">
<createTable tableName="m_creditbureau_token">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="username" type="VARCHAR(128)"/>
<column name="token" type="MEDIUMTEXT"/>
<column name="tokenType" type="VARCHAR(128)"/>
<column name="expiresIn" type="VARCHAR(128)"/>
<column name="issued" type="VARCHAR(128)"/>
<column defaultValueComputed="NULL" name="expiryDate" type="date"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="52">
<createTable tableName="m_creditreport">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="creditBureauId" type="BIGINT"/>
<column name="nationalId" type="VARCHAR(128)"/>
<column defaultValueComputed="NULL" name="creditReports" type="BLOB"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="53">
<createTable tableName="m_currency">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="code" type="VARCHAR(3)">
<constraints nullable="false" unique="true"/>
</column>
<column name="decimal_places" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="currency_multiplesof" type="SMALLINT"/>
<column name="display_symbol" type="VARCHAR(10)"/>
<column name="name" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="internationalized_name_code" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="54">
<createTable tableName="m_deposit_account_on_hold_transaction">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="savings_account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="transaction_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="transaction_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_reversed" type="boolean">
<constraints nullable="false"/>
</column>
<column name="created_date" type="datetime">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="55">
<createTable tableName="m_deposit_account_recurring_detail">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0" name="savings_account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="mandatory_recommended_deposit_amount" type="DECIMAL(19, 6)"/>
<column defaultValueBoolean="false" name="is_mandatory" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="allow_withdrawal" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="adjust_advance_towards_future_payments" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_calendar_inherited" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="total_overdue_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="no_of_overdue_installments" type="INT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="56">
<createTable tableName="m_deposit_account_term_and_preclosure">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0" name="savings_account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="min_deposit_term" type="INT"/>
<column defaultValueComputed="NULL" name="max_deposit_term" type="INT"/>
<column defaultValueComputed="NULL" name="min_deposit_term_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="max_deposit_term_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="in_multiples_of_deposit_term" type="INT"/>
<column defaultValueComputed="NULL" name="in_multiples_of_deposit_term_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="pre_closure_penal_applicable" type="boolean"/>
<column defaultValueComputed="NULL" name="pre_closure_penal_interest" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="pre_closure_penal_interest_on_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="deposit_period" type="INT"/>
<column defaultValueComputed="NULL" name="deposit_period_frequency_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="deposit_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="maturity_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="maturity_date" type="date"/>
<column defaultValueComputed="NULL" name="on_account_closure_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="expected_firstdepositon_date" type="date"/>
<column defaultValueBoolean="false" name="transfer_interest_to_linked_account" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="transfer_to_savings_account_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="57">
<createTable tableName="m_deposit_product_interest_rate_chart">
<column name="deposit_product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="interest_rate_chart_id" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="58">
<createTable tableName="m_deposit_product_recurring_detail">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0" name="savings_product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="is_mandatory" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="allow_withdrawal" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="adjust_advance_towards_future_payments" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="59">
<createTable tableName="m_deposit_product_term_and_preclosure">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0" name="savings_product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="min_deposit_term" type="INT"/>
<column defaultValueComputed="NULL" name="max_deposit_term" type="INT"/>
<column defaultValueComputed="NULL" name="min_deposit_term_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="max_deposit_term_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="in_multiples_of_deposit_term" type="INT"/>
<column defaultValueComputed="NULL" name="in_multiples_of_deposit_term_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="pre_closure_penal_applicable" type="boolean"/>
<column defaultValueComputed="NULL" name="pre_closure_penal_interest" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="pre_closure_penal_interest_on_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="min_deposit_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="max_deposit_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="deposit_amount" type="DECIMAL(19, 6)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="60">
<createTable tableName="m_document">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="parent_entity_type" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="parent_entity_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="name" type="VARCHAR(250)">
<constraints nullable="false"/>
</column>
<column name="file_name" type="VARCHAR(250)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="size" type="INT"/>
<column name="type" type="VARCHAR(500)"/>
<column name="description" type="VARCHAR(1000)"/>
<column defaultValue="0" name="location" type="VARCHAR(500)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="storage_type_enum" type="SMALLINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="61">
<createTable tableName="m_entity_datatable_check">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="application_table_name" type="VARCHAR(200)">
<constraints nullable="false"/>
</column>
<column name="x_registered_table_name" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="status_enum" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="system_defined" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="product_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="62">
<createTable tableName="m_entity_relation">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="from_entity_type" type="INT">
<constraints nullable="false"/>
</column>
<column name="to_entity_type" type="INT">
<constraints nullable="false"/>
</column>
<column name="code_name" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="63">
<createTable tableName="m_entity_to_entity_access">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="entity_type" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="entity_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="access_type_code_value_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="second_entity_type" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="second_entity_id" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="64">
<createTable tableName="m_entity_to_entity_mapping">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0" name="rel_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="from_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="to_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="start_date" type="date"/>
<column defaultValueComputed="NULL" name="end_date" type="date"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="65">
<createTable tableName="m_family_members">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="firstname" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="middlename" type="VARCHAR(50)"/>
<column name="lastname" type="VARCHAR(50)"/>
<column name="qualification" type="VARCHAR(50)"/>
<column name="relationship_cv_id" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="marital_status_cv_id" type="INT"/>
<column defaultValueComputed="NULL" name="gender_cv_id" type="INT"/>
<column defaultValueComputed="NULL" name="date_of_birth" type="date"/>
<column defaultValueComputed="NULL" name="age" type="INT"/>
<column defaultValueComputed="NULL" name="profession_cv_id" type="INT"/>
<column name="mobile_number" type="VARCHAR(50)"/>
<column defaultValueComputed="NULL" name="is_dependent" type="boolean"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="66">
<createTable tableName="m_field_configuration">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="entity" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="subentity" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="field" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="is_enabled" type="boolean">
<constraints nullable="false"/>
</column>
<column name="is_mandatory" type="boolean">
<constraints nullable="false"/>
</column>
<column name="validation_regex" type="VARCHAR(50)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="67">
<createTable tableName="m_floating_rates">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(200)">
<constraints nullable="false" unique="true"/>
</column>
<column defaultValueBoolean="false" name="is_base_lending_rate" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
<column name="createdby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created_date" type="datetime">
<constraints nullable="false"/>
</column>
<column name="lastmodifiedby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="lastmodified_date" type="datetime">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="68">
<createTable tableName="m_floating_rates_periods">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="floating_rates_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="from_date" type="datetime">
<constraints nullable="false"/>
</column>
<column name="interest_rate" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_differential_to_base_lending_rate" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
<column name="createdby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created_date" type="datetime">
<constraints nullable="false"/>
</column>
<column name="lastmodifiedby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="lastmodified_date" type="datetime">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="69">
<createTable tableName="m_fund">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(255)">
<constraints unique="true"/>
</column>
<column name="external_id" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="70">
<createTable tableName="m_group">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="external_id" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column defaultValueNumeric="300" name="status_enum" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="activation_date" type="date"/>
<column name="office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="staff_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="parent_id" type="BIGINT"/>
<column name="level_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="display_name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="hierarchy" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="closure_reason_cv_id" type="INT"/>
<column defaultValueComputed="NULL" name="closedon_date" type="date"/>
<column defaultValueComputed="NULL" name="activatedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="submittedon_date" type="date"/>
<column defaultValueComputed="NULL" name="submittedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="closedon_userid" type="BIGINT"/>
<column name="account_no" type="VARCHAR(20)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="71">
<createTable tableName="m_group_client">
<column name="group_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="72">
<createTable tableName="m_group_level">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="parent_id" type="INT"/>
<column name="super_parent" type="boolean">
<constraints nullable="false"/>
</column>
<column name="level_name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="recursable" type="boolean">
<constraints nullable="false"/>
</column>
<column name="can_have_clients" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="73">
<createTable tableName="m_group_roles">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="client_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="group_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="role_cv_id" type="INT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="74">
<createTable tableName="m_guarantor">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="client_reln_cv_id" type="INT"/>
<column name="type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="entity_id" type="BIGINT"/>
<column name="firstname" type="VARCHAR(50)"/>
<column name="lastname" type="VARCHAR(50)"/>
<column defaultValueComputed="NULL" name="dob" type="date"/>
<column name="address_line_1" type="VARCHAR(500)"/>
<column name="address_line_2" type="VARCHAR(500)"/>
<column name="city" type="VARCHAR(50)"/>
<column name="state" type="VARCHAR(50)"/>
<column name="country" type="VARCHAR(50)"/>
<column name="zip" type="VARCHAR(20)"/>
<column name="house_phone_number" type="VARCHAR(20)"/>
<column name="mobile_number" type="VARCHAR(20)"/>
<column name="comment" type="VARCHAR(500)"/>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="75">
<createTable tableName="m_guarantor_funding_details">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="guarantor_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="account_associations_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="amount_released_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_remaining_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_transfered_derived" type="DECIMAL(19, 6)"/>
<column name="status_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="76">
<createTable tableName="m_guarantor_transaction">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="guarantor_fund_detail_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="loan_transaction_id" type="BIGINT"/>
<column name="deposit_on_hold_transaction_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_reversed" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="77">
<createTable tableName="m_holiday">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="from_date" type="datetime">
<constraints nullable="false"/>
</column>
<column name="to_date" type="datetime">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="repayments_rescheduled_to" type="datetime"/>
<column defaultValueNumeric="100" name="status_enum" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="processed" type="boolean">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(100)"/>
<column defaultValueNumeric="2" name="rescheduling_type" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="78">
<createTable tableName="m_holiday_office">
<column name="holiday_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="office_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="79">
<createTable tableName="m_hook">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="template_id" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
<column name="name" type="VARCHAR(45)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column defaultValueComputed="NULL" name="ugd_template_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="80">
<createTable tableName="m_hook_configuration">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="hook_id" type="BIGINT"/>
<column name="field_type" type="VARCHAR(45)">
<constraints nullable="false"/>
</column>
<column name="field_name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="field_value" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="81">
<createTable tableName="m_hook_registered_events">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="hook_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="entity_name" type="VARCHAR(45)">
<constraints nullable="false"/>
</column>
<column name="action_name" type="VARCHAR(45)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="82">
<createTable tableName="m_hook_schema">
<column autoIncrement="true" name="id" type="SMALLINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="hook_template_id" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="field_type" type="VARCHAR(45)">
<constraints nullable="false"/>
</column>
<column name="field_name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="placeholder" type="VARCHAR(100)"/>
<column defaultValueBoolean="false" name="optional" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="83">
<createTable tableName="m_hook_templates">
<column autoIncrement="true" name="id" type="SMALLINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(45)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="84">
<createTable tableName="m_image">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="location" type="VARCHAR(500)"/>
<column defaultValueComputed="NULL" name="storage_type_enum" type="SMALLINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="85">
<createTable tableName="m_import_document">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="document_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="import_time" type="datetime">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="end_time" type="datetime"/>
<column name="entity_type" type="TINYINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="completed" type="boolean"/>
<column defaultValueNumeric="0" name="total_records" type="BIGINT"/>
<column defaultValueNumeric="0" name="success_count" type="BIGINT"/>
<column defaultValueNumeric="0" name="failure_count" type="BIGINT"/>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="86">
<createTable tableName="m_interest_incentives">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="interest_rate_slab_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="entiry_type" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="attribute_name" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="condition_type" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="attribute_value" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="incentive_type" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="87">
<createTable tableName="m_interest_rate_chart">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)"/>
<column name="description" type="VARCHAR(200)"/>
<column name="from_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="end_date" type="date"/>
<column defaultValueBoolean="false" name="is_primary_grouping_by_amount" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="88">
<createTable tableName="m_interest_rate_slab">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="interest_rate_chart_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(200)"/>
<column defaultValueComputed="NULL" name="period_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="from_period" type="INT"/>
<column defaultValueComputed="NULL" name="to_period" type="INT"/>
<column defaultValueComputed="NULL" name="amount_range_from" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_range_to" type="DECIMAL(19, 6)"/>
<column name="annual_interest_rate" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="89">
<createTable tableName="m_loan">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="account_no" type="VARCHAR(20)">
<constraints nullable="false" unique="true"/>
</column>
<column name="external_id" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column defaultValueComputed="NULL" name="client_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="group_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="glim_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="product_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="fund_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="loan_officer_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="loanpurpose_cv_id" type="INT"/>
<column name="loan_status_id" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="loan_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column name="currency_digits" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="currency_multiplesof" type="SMALLINT"/>
<column name="principal_amount_proposed" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="principal_amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="approved_principal" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="net_disbursal_amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="arrearstolerance_amount" type="DECIMAL(19, 6)"/>
<column defaultValueBoolean="false" name="is_floating_interest_rate" type="boolean"/>
<column defaultValueNumeric="0.000000" name="interest_rate_differential" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="nominal_interest_rate_per_period" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="interest_period_frequency_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="annual_nominal_interest_rate" type="DECIMAL(19, 6)"/>
<column name="interest_method_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="1" name="interest_calculated_in_period_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="allow_partial_period_interest_calcualtion" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="term_frequency" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="2" name="term_period_frequency_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="repay_every" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="repayment_period_frequency_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="number_of_repayments" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="grace_on_principal_periods" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="recurring_moratorium_principal_periods" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="grace_on_interest_periods" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="grace_interest_free_periods" type="SMALLINT"/>
<column name="amortization_method_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="submittedon_date" type="date"/>
<column defaultValueComputed="NULL" name="submittedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="approvedon_date" type="date"/>
<column defaultValueComputed="NULL" name="approvedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="expected_disbursedon_date" type="date"/>
<column defaultValueComputed="NULL" name="expected_firstrepaymenton_date" type="date"/>
<column defaultValueComputed="NULL" name="interest_calculated_from_date" type="date"/>
<column defaultValueComputed="NULL" name="disbursedon_date" type="date"/>
<column defaultValueComputed="NULL" name="disbursedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="expected_maturedon_date" type="date"/>
<column defaultValueComputed="NULL" name="maturedon_date" type="date"/>
<column defaultValueComputed="NULL" name="closedon_date" type="date"/>
<column defaultValueComputed="NULL" name="closedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="total_charges_due_at_disbursement_derived" type="DECIMAL(19, 6)"/>
<column defaultValueNumeric="0.000000" name="principal_disbursed_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="principal_repaid_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="principal_writtenoff_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="principal_outstanding_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="interest_charged_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="interest_repaid_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="interest_waived_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="interest_writtenoff_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="interest_outstanding_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="fee_charges_charged_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="fee_charges_repaid_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="fee_charges_waived_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="fee_charges_writtenoff_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="fee_charges_outstanding_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="penalty_charges_charged_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="penalty_charges_repaid_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="penalty_charges_waived_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="penalty_charges_writtenoff_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="penalty_charges_outstanding_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="total_expected_repayment_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="total_repayment_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="total_expected_costofloan_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="total_costofloan_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="total_waived_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="total_writtenoff_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="total_outstanding_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="total_overpaid_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="rejectedon_date" type="date"/>
<column defaultValueComputed="NULL" name="rejectedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="rescheduledon_date" type="date"/>
<column defaultValueComputed="NULL" name="rescheduledon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="withdrawnon_date" type="date"/>
<column defaultValueComputed="NULL" name="withdrawnon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="writtenoffon_date" type="date"/>
<column defaultValueComputed="NULL" name="loan_transaction_strategy_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="sync_disbursement_with_meeting" type="boolean"/>
<column defaultValueComputed="NULL" name="loan_counter" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="loan_product_counter" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="fixed_emi_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="max_outstanding_loan_balance" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="grace_on_arrears_ageing" type="SMALLINT"/>
<column defaultValueBoolean="false" name="is_npa" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="total_recovered_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="accrued_till" type="date"/>
<column defaultValueComputed="NULL" name="interest_recalcualated_on" type="date"/>
<column defaultValueNumeric="1" name="days_in_month_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="1" name="days_in_year_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="interest_recalculation_enabled" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="guarantee_amount_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="create_standing_instruction_at_disbursement" type="boolean"/>
<column defaultValueNumeric="1" name="version" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="writeoff_reason_cv_id" type="INT"/>
<column defaultValueComputed="NULL" name="loan_sub_status_id" type="SMALLINT"/>
<column defaultValueBoolean="false" name="is_topup" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_equal_amortization" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="fixed_principal_percentage_per_installment" type="DECIMAL(5, 2)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="90">
<createTable tableName="m_loan_arrears_aging">
<column autoIncrement="true" name="loan_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0.000000" name="principal_overdue_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="interest_overdue_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="fee_charges_overdue_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="penalty_charges_overdue_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="total_overdue_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="overdue_since_date_derived" type="date"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="91">
<createTable tableName="m_loan_charge">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="charge_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_penalty" type="boolean">
<constraints nullable="false"/>
</column>
<column name="charge_time_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="due_for_collection_as_of_date" type="date"/>
<column name="charge_calculation_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="charge_payment_mode_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="calculation_percentage" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="calculation_on_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="charge_amount_or_percentage" type="DECIMAL(19, 6)"/>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="amount_paid_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_waived_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_writtenoff_derived" type="DECIMAL(19, 6)"/>
<column defaultValueNumeric="0.000000" name="amount_outstanding_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_paid_derived" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="waived" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="min_cap" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="max_cap" type="DECIMAL(19, 6)"/>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="92">
<createTable tableName="m_loan_charge_paid_by">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_transaction_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="loan_charge_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="installment_number" type="SMALLINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="93">
<createTable tableName="m_loan_collateral">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="type_cv_id" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="value" type="DECIMAL(19, 6)"/>
<column name="description" type="VARCHAR(500)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="94">
<createTable tableName="m_loan_collateral_management">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="quantity" type="DECIMAL(20, 5)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="loan_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="client_collateral_id" type="BIGINT"/>
<column defaultValueBoolean="false" name="is_released" type="boolean"/>
<column defaultValueComputed="NULL" name="transaction_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="95">
<createTable tableName="m_loan_disbursement_detail">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="expected_disburse_date" type="datetime">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="disbursedon_date" type="datetime"/>
<column name="principal" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="net_disbursal_amount" type="DECIMAL(19, 6)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="96">
<createTable tableName="m_loan_installment_charge">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_charge_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="loan_schedule_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="due_date" type="date"/>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="amount_paid_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_waived_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_writtenoff_derived" type="DECIMAL(19, 6)"/>
<column defaultValueNumeric="0.000000" name="amount_outstanding_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_paid_derived" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="waived" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="amount_through_charge_payment" type="DECIMAL(19, 6)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="97">
<createTable tableName="m_loan_interest_recalculation_additional_details">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_repayment_schedule_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="effective_date" type="date">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="98">
<createTable tableName="m_loan_officer_assignment_history">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="loan_officer_id" type="BIGINT"/>
<column name="start_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="end_date" type="date"/>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="99">
<createTable tableName="m_loan_overdue_installment_charge">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_charge_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="loan_schedule_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="frequency_number" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="100">
<createTable tableName="m_loan_paid_in_advance">
<column name="loan_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0.000000" name="principal_in_advance_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="interest_in_advance_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="fee_charges_in_advance_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="penalty_charges_in_advance_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="total_in_advance_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="101">
<createTable tableName="m_loan_rate">
<column name="loan_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="rate_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="102">
<createTable tableName="m_loan_recalculation_details">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="compound_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="reschedule_strategy_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="rest_frequency_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="rest_frequency_interval" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="compounding_frequency_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="compounding_frequency_interval" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="rest_frequency_nth_day_enum" type="INT"/>
<column defaultValueComputed="NULL" name="rest_frequency_on_day" type="INT"/>
<column defaultValueComputed="NULL" name="rest_frequency_weekday_enum" type="INT"/>
<column defaultValueComputed="NULL" name="compounding_frequency_nth_day_enum" type="INT"/>
<column defaultValueComputed="NULL" name="compounding_frequency_on_day" type="INT"/>
<column defaultValueBoolean="false" name="is_compounding_to_be_posted_as_transaction" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="compounding_frequency_weekday_enum" type="INT"/>
<column defaultValueBoolean="false" name="allow_compounding_on_eod" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="103">
<createTable tableName="m_loan_repayment_schedule">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="fromdate" type="date"/>
<column name="duedate" type="date">
<constraints nullable="false"/>
</column>
<column name="installment" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="principal_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="principal_completed_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="principal_writtenoff_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="interest_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="interest_completed_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="interest_writtenoff_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="interest_waived_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="accrual_interest_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="reschedule_interest_portion" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="fee_charges_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="fee_charges_completed_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="fee_charges_writtenoff_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="fee_charges_waived_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="accrual_fee_charges_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="penalty_charges_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="penalty_charges_completed_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="penalty_charges_writtenoff_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="penalty_charges_waived_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="accrual_penalty_charges_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="total_paid_in_advance_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="total_paid_late_derived" type="DECIMAL(19, 6)"/>
<column name="completed_derived" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="obligations_met_on_date" type="date"/>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
<column defaultValueBoolean="false" name="recalculated_interest_component" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="104">
<createTable tableName="m_loan_repayment_schedule_history">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="loan_reschedule_request_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="fromdate" type="date"/>
<column name="duedate" type="date">
<constraints nullable="false"/>
</column>
<column name="installment" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="principal_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="interest_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="fee_charges_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="penalty_charges_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
<column name="version" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="105">
<createTable tableName="m_loan_reschedule_request">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="status_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="reschedule_from_installment" remarks="Rescheduling will start from this installment"
type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="reschedule_from_date"
remarks="Rescheduling will start from the installment with due date similar to this date."
type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="recalculate_interest"
remarks="If set to 1, interest will be recalculated starting from the reschedule period."
type="boolean"/>
<column defaultValueComputed="NULL" name="reschedule_reason_cv_id"
remarks="ID of code value of reason for rescheduling" type="INT"/>
<column name="reschedule_reason_comment" remarks="Text provided in addition to the reason code value"
type="VARCHAR(500)"/>
<column name="submitted_on_date" type="date">
<constraints nullable="false"/>
</column>
<column name="submitted_by_user_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="approved_on_date" type="date"/>
<column defaultValueComputed="NULL" name="approved_by_user_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="rejected_on_date" type="date"/>
<column defaultValueComputed="NULL" name="rejected_by_user_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="106">
<createTable tableName="m_loan_reschedule_request_term_variations_mapping">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_reschedule_request_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="loan_term_variations_id" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="107">
<createTable tableName="m_loan_term_variations">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="term_type" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="applicable_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="decimal_value" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="date_value" type="date"/>
<column defaultValueBoolean="false" name="is_specific_to_installment" type="boolean">
<constraints nullable="false"/>
</column>
<column name="applied_on_loan_status" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="parent_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="108">
<createTable tableName="m_loan_topup">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="closure_loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="account_transfer_details_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="topup_amount" type="DECIMAL(19, 6)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="109">
<createTable tableName="m_loan_tranche_charges">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="charge_id" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="110">
<createTable tableName="m_loan_tranche_disbursement_charge">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_charge_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="disbursement_detail_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="111">
<createTable tableName="m_loan_transaction">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="payment_detail_id" type="BIGINT"/>
<column name="is_reversed" type="boolean">
<constraints nullable="false"/>
</column>
<column name="external_id" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column name="transaction_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="transaction_date" type="date">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="principal_portion_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="interest_portion_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="fee_charges_portion_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="penalty_charges_portion_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="overpayment_portion_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="unrecognized_income_portion" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="outstanding_loan_balance_derived" type="DECIMAL(19, 6)"/>
<column name="submitted_on_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="manually_adjusted_or_reversed" type="boolean"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="appuser_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="112">
<createTable tableName="m_loan_transaction_repayment_schedule_mapping">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_transaction_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="loan_repayment_schedule_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="principal_portion_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="interest_portion_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="fee_charges_portion_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="penalty_charges_portion_derived" type="DECIMAL(19, 6)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="113">
<createTable tableName="m_loanproduct_provisioning_entry">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="history_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="criteria_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column name="office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="category_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="overdue_in_days" type="BIGINT"/>
<column defaultValueNumeric="0.000000" name="reseve_amount" type="DECIMAL(20, 6)"/>
<column defaultValueComputed="NULL" name="liability_account" type="BIGINT"/>
<column defaultValueComputed="NULL" name="expense_account" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="114">
<createTable tableName="m_loanproduct_provisioning_mapping">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="product_id" type="BIGINT">
<constraints nullable="false" unique="true"/>
</column>
<column name="criteria_id" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="115">
<createTable tableName="m_mandatory_savings_schedule">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="savings_account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="fromdate" type="date"/>
<column name="duedate" type="date">
<constraints nullable="false"/>
</column>
<column name="installment" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="deposit_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="deposit_amount_completed_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="total_paid_in_advance_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="total_paid_late_derived" type="DECIMAL(19, 6)"/>
<column name="completed_derived" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="obligations_met_on_date" type="date"/>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="116">
<createTable tableName="m_meeting">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="calendar_instance_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="meeting_date" type="date">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="117">
<createTable tableName="m_note">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="client_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="group_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="loan_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="loan_transaction_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="savings_account_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="savings_account_transaction_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="share_account_id" type="BIGINT"/>
<column name="note_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="note" type="VARCHAR(1000)"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="118">
<createTable tableName="m_office">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="parent_id" type="BIGINT"/>
<column name="hierarchy" type="VARCHAR(100)"/>
<column name="external_id" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column name="name" type="VARCHAR(50)">
<constraints nullable="false" unique="true"/>
</column>
<column name="opening_date" type="date">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="119">
<createTable tableName="m_office_transaction">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="from_office_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="to_office_id" type="BIGINT"/>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column name="currency_digits" type="INT">
<constraints nullable="false"/>
</column>
<column name="transaction_amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="transaction_date" type="date">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(100)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="120">
<createTable tableName="m_organisation_creditbureau">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="alias" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="creditbureau_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="isActive" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="121">
<createTable tableName="m_organisation_currency">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column name="decimal_places" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="currency_multiplesof" type="SMALLINT"/>
<column name="name" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="display_symbol" type="VARCHAR(10)"/>
<column name="internationalized_name_code" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="122">
<createTable tableName="m_password_validation_policy">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="regex" type="TEXT">
<constraints nullable="false"/>
</column>
<column name="description" type="TEXT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="active" type="boolean">
<constraints nullable="false"/>
</column>
<column name="key" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="123">
<createTable tableName="m_payment_detail">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="payment_type_id" type="INT"/>
<column name="account_number" type="VARCHAR(100)"/>
<column name="check_number" type="VARCHAR(100)"/>
<column name="receipt_number" type="VARCHAR(100)"/>
<column name="bank_number" type="VARCHAR(100)"/>
<column name="routing_code" type="VARCHAR(100)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="124">
<createTable tableName="m_payment_type">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="value" type="VARCHAR(100)"/>
<column name="description" type="VARCHAR(500)"/>
<column defaultValueBoolean="false" name="is_cash_payment" type="boolean"/>
<column defaultValueNumeric="0" name="order_position" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="125">
<createTable tableName="m_permission">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="grouping" type="VARCHAR(45)"/>
<column name="code" type="VARCHAR(100)">
<constraints nullable="false" unique="true"/>
</column>
<column name="entity_name" type="VARCHAR(100)"/>
<column name="action_name" type="VARCHAR(100)"/>
<column defaultValueBoolean="true" name="can_maker_checker" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="126">
<createTable tableName="m_pocket">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="app_user_id" type="BIGINT">
<constraints nullable="false" unique="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="127">
<createTable tableName="m_pocket_accounts_mapping">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="pocket_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="account_type" type="INT">
<constraints nullable="false"/>
</column>
<column name="account_number" type="VARCHAR(20)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="128">
<createTable tableName="m_portfolio_account_associations">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="loan_account_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="savings_account_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="linked_loan_account_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="linked_savings_account_id" type="BIGINT"/>
<column defaultValueNumeric="1" name="association_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="129">
<createTable tableName="m_portfolio_command_source">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="action_name" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="entity_name" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="office_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="group_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="client_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="loan_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="savings_account_id" type="BIGINT"/>
<column name="api_get_url" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="resource_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="subresource_id" type="BIGINT"/>
<column name="command_as_json" type="TEXT">
<constraints nullable="false"/>
</column>
<column name="maker_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="made_on_date" type="datetime">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="checker_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="checked_on_date" type="datetime"/>
<column name="processing_result_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="product_id" type="BIGINT"/>
<column name="transaction_id" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="creditbureau_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="organisation_creditbureau_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="130">
<createTable tableName="m_product_loan">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="short_name" type="VARCHAR(4)">
<constraints nullable="false" unique="true"/>
</column>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column name="currency_digits" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="currency_multiplesof" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="principal_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="min_principal_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="max_principal_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="arrearstolerance_amount" type="DECIMAL(19, 6)"/>
<column name="name" type="VARCHAR(100)">
<constraints nullable="false" unique="true"/>
</column>
<column name="description" type="VARCHAR(500)"/>
<column defaultValueComputed="NULL" name="fund_id" type="BIGINT"/>
<column defaultValueBoolean="false" name="is_linked_to_floating_interest_rates" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="allow_variabe_installments" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="nominal_interest_rate_per_period" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="min_nominal_interest_rate_per_period" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="max_nominal_interest_rate_per_period" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="interest_period_frequency_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="annual_nominal_interest_rate" type="DECIMAL(19, 6)"/>
<column name="interest_method_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="1" name="interest_calculated_in_period_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="allow_partial_period_interest_calcualtion" type="boolean">
<constraints nullable="false"/>
</column>
<column name="repay_every" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="repayment_period_frequency_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="number_of_repayments" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="min_number_of_repayments" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="max_number_of_repayments" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="grace_on_principal_periods" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="recurring_moratorium_principal_periods" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="grace_on_interest_periods" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="grace_interest_free_periods" type="SMALLINT"/>
<column name="amortization_method_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="accounting_type" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="loan_transaction_strategy_id" type="BIGINT"/>
<column name="external_id" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column defaultValueBoolean="false" name="include_in_borrower_cycle" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="use_borrower_cycle" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="start_date" type="date"/>
<column defaultValueComputed="NULL" name="close_date" type="date"/>
<column defaultValueBoolean="false" name="allow_multiple_disbursals" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="max_disbursals" type="INT"/>
<column defaultValueComputed="NULL" name="max_outstanding_loan_balance" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="grace_on_arrears_ageing" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="overdue_days_for_npa" type="SMALLINT"/>
<column defaultValueNumeric="1" name="days_in_month_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="1" name="days_in_year_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="interest_recalculation_enabled" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="min_days_between_disbursal_and_first_repayment" type="INT"/>
<column defaultValueBoolean="false" name="hold_guarantee_funds" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="50.00" name="principal_threshold_for_last_installment" type="DECIMAL(5, 2)">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="account_moves_out_of_npa_only_on_arrears_completion" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="can_define_fixed_emi_amount" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="instalment_amount_in_multiples_of" type="DECIMAL(19, 6)"/>
<column defaultValueBoolean="false" name="can_use_for_topup" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="sync_expected_with_disbursement_date" type="boolean"/>
<column defaultValueBoolean="false" name="is_equal_amortization" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="fixed_principal_percentage_per_installment" type="DECIMAL(5, 2)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="131">
<createTable tableName="m_product_loan_charge">
<column name="product_loan_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="charge_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="132">
<createTable tableName="m_product_loan_configurable_attributes">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="amortization_method_enum" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="interest_method_enum" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="loan_transaction_strategy_id" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="interest_calculated_in_period_enum" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="arrearstolerance_amount" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="repay_every" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="moratorium" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="grace_on_arrears_ageing" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="133">
<createTable tableName="m_product_loan_floating_rates">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="floating_rates_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="interest_rate_differential" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="min_differential_lending_rate" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="default_differential_lending_rate" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="max_differential_lending_rate" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_floating_interest_rate_calculation_allowed" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="134">
<createTable tableName="m_product_loan_guarantee_details">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="mandatory_guarantee" type="DECIMAL(19, 5)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="minimum_guarantee_from_own_funds" type="DECIMAL(19, 5)"/>
<column defaultValueComputed="NULL" name="minimum_guarantee_from_guarantor_funds" type="DECIMAL(19, 5)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="135">
<createTable tableName="m_product_loan_rate">
<column name="product_loan_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="rate_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="136">
<createTable tableName="m_product_loan_recalculation_details">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="compound_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="reschedule_strategy_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="rest_frequency_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="rest_frequency_interval" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="arrears_based_on_original_schedule" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="1" name="pre_close_interest_calculation_strategy" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="compounding_frequency_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="compounding_frequency_interval" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="rest_frequency_nth_day_enum" type="INT"/>
<column defaultValueComputed="NULL" name="rest_frequency_on_day" type="INT"/>
<column defaultValueComputed="NULL" name="rest_frequency_weekday_enum" type="INT"/>
<column defaultValueComputed="NULL" name="compounding_frequency_nth_day_enum" type="INT"/>
<column defaultValueComputed="NULL" name="compounding_frequency_on_day" type="INT"/>
<column defaultValueComputed="NULL" name="compounding_frequency_weekday_enum" type="INT"/>
<column defaultValueBoolean="false" name="is_compounding_to_be_posted_as_transaction" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="allow_compounding_on_eod" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="137">
<createTable tableName="m_product_loan_variable_installment_config">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="minimum_gap" type="INT">
<constraints nullable="false"/>
</column>
<column name="maximum_gap" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="138">
<createTable tableName="m_product_loan_variations_borrower_cycle">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueNumeric="0" name="loan_product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="borrower_cycle_number" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="value_condition" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="param_type" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0.000000" name="default_value" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="max_value" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="min_value" type="DECIMAL(19, 6)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="139">
<createTable tableName="m_product_mix">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="restricted_product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="140">
<createTable tableName="m_provision_category">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="category_name" type="VARCHAR(100)">
<constraints nullable="false" unique="true"/>
</column>
<column name="description" type="VARCHAR(300)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="141">
<createTable tableName="m_provisioning_criteria">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="criteria_name" type="VARCHAR(200)">
<constraints nullable="false" unique="true"/>
</column>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="142">
<createTable tableName="m_provisioning_criteria_definition">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="criteria_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="category_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="min_age" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="max_age" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="provision_percentage" type="DECIMAL(5, 2)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="liability_account" type="BIGINT"/>
<column defaultValueComputed="NULL" name="expense_account" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="143">
<createTable tableName="m_provisioning_history">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueBoolean="false" name="journal_entry_created" type="boolean"/>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="date"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="date"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="144">
<createTable tableName="m_rate">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(250)">
<constraints nullable="false"/>
</column>
<column name="percentage" type="DECIMAL(10, 2)">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="active" type="boolean"/>
<column name="product_apply" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column name="createdby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="lastmodifiedby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column defaultValueComputed="NULL" name="approve_user" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="145">
<createTable tableName="m_repayment_with_post_dated_checks">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="check_no" type="BIGINT">
<constraints nullable="false" unique="true"/>
</column>
<column name="amount" type="DECIMAL(20, 5)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="loan_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="repayment_id" type="BIGINT"/>
<column name="account_no" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="bank_name" type="VARCHAR(200)">
<constraints nullable="false"/>
</column>
<column name="repayment_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="status" type="SMALLINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="146">
<createTable tableName="m_report_mailing_job">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)">
<constraints nullable="false" unique="true"/>
</column>
<column name="description" type="TEXT"/>
<column name="start_datetime" type="datetime">
<constraints nullable="false"/>
</column>
<column name="recurrence" type="VARCHAR(100)"/>
<column name="created_date" type="date">
<constraints nullable="false"/>
</column>
<column name="createdby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="lastmodified_date" type="date"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
<column name="email_recipients" type="TEXT">
<constraints nullable="false"/>
</column>
<column name="email_subject" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="email_message" type="TEXT">
<constraints nullable="false"/>
</column>
<column name="email_attachment_file_format" type="VARCHAR(10)">
<constraints nullable="false"/>
</column>
<column name="stretchy_report_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="stretchy_report_param_map" type="TEXT"/>
<column defaultValueComputed="NULL" name="previous_run_datetime" type="datetime"/>
<column defaultValueComputed="NULL" name="next_run_datetime" type="datetime"/>
<column name="previous_run_status" type="VARCHAR(10)"/>
<column name="previous_run_error_log" type="TEXT"/>
<column name="previous_run_error_message" type="TEXT"/>
<column defaultValueNumeric="0" name="number_of_runs" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_deleted" type="boolean">
<constraints nullable="false"/>
</column>
<column name="run_as_userid" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="147">
<createTable tableName="m_report_mailing_job_configuration">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(50)">
<constraints nullable="false" unique="true"/>
</column>
<column name="value" type="VARCHAR(200)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="148">
<createTable tableName="m_report_mailing_job_run_history">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="job_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="start_datetime" type="datetime">
<constraints nullable="false"/>
</column>
<column name="end_datetime" type="datetime">
<constraints nullable="false"/>
</column>
<column name="status" type="VARCHAR(10)">
<constraints nullable="false"/>
</column>
<column name="error_message" type="TEXT"/>
<column name="error_log" type="TEXT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="149">
<createTable tableName="m_role">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)">
<constraints nullable="false" unique="true"/>
</column>
<column name="description" type="VARCHAR(500)">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_disabled" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="150">
<createTable tableName="m_role_permission">
<column name="role_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="permission_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="151">
<createTable tableName="m_savings_account">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="account_no" type="VARCHAR(20)">
<constraints nullable="false" unique="true"/>
</column>
<column name="external_id" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column defaultValueComputed="NULL" name="client_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="group_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="gsim_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="product_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="field_officer_id" type="BIGINT"/>
<column defaultValueNumeric="300" name="status_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="sub_status_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="1" name="account_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="100" name="deposit_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="submittedon_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="submittedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="approvedon_date" type="date"/>
<column defaultValueComputed="NULL" name="approvedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="rejectedon_date" type="date"/>
<column defaultValueComputed="NULL" name="rejectedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="withdrawnon_date" type="date"/>
<column defaultValueComputed="NULL" name="withdrawnon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="activatedon_date" type="date"/>
<column defaultValueComputed="NULL" name="activatedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="closedon_date" type="date"/>
<column defaultValueComputed="NULL" name="closedon_userid" type="BIGINT"/>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column name="currency_digits" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="currency_multiplesof" type="SMALLINT"/>
<column name="nominal_annual_interest_rate" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="interest_compounding_period_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="4" name="interest_posting_period_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="interest_calculation_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="interest_calculation_days_in_year_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="min_required_opening_balance" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="lockin_period_frequency" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="lockin_period_frequency_enum" type="SMALLINT"/>
<column defaultValueBoolean="true" name="withdrawal_fee_for_transfer" type="boolean"/>
<column defaultValueBoolean="false" name="allow_overdraft" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="overdraft_limit" type="DECIMAL(19, 6)"/>
<column defaultValueNumeric="0.000000" name="nominal_annual_interest_rate_overdraft" type="DECIMAL(19, 6)"/>
<column defaultValueNumeric="0.000000" name="min_overdraft_for_interest_calculation" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="lockedin_until_date_derived" type="date"/>
<column defaultValueComputed="NULL" name="total_deposits_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="total_withdrawals_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="total_withdrawal_fees_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="total_fees_charge_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="total_penalty_charge_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="total_annual_fees_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="total_interest_earned_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="total_interest_posted_derived" type="DECIMAL(19, 6)"/>
<column defaultValueNumeric="0.000000" name="total_overdraft_interest_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="total_withhold_tax_derived" type="DECIMAL(19, 6)"/>
<column defaultValueNumeric="0.000000" name="account_balance_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="min_required_balance" type="DECIMAL(19, 6)"/>
<column defaultValueBoolean="false" name="enforce_min_required_balance" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="min_balance_for_interest_calculation" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="start_interest_calculation_date" type="date"/>
<column defaultValueComputed="NULL" name="on_hold_funds_derived" type="DECIMAL(19, 6)"/>
<column defaultValueNumeric="1" name="version" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="withhold_tax" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="tax_group_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="last_interest_calculation_date" type="date"/>
<column defaultValueComputed="NULL" name="total_savings_amount_on_hold" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="interest_posted_till_date" type="date"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="152">
<createTable tableName="m_savings_account_charge">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="savings_account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="charge_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_penalty" type="boolean">
<constraints nullable="false"/>
</column>
<column name="charge_time_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="charge_due_date" type="date"/>
<column defaultValueComputed="NULL" name="fee_on_month" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="fee_on_day" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="fee_interval" type="SMALLINT"/>
<column defaultValueNumeric="0" name="free_withdrawal_count" type="INT"/>
<column defaultValueComputed="NULL" name="charge_reset_date" type="date"/>
<column name="charge_calculation_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="calculation_percentage" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="calculation_on_amount" type="DECIMAL(19, 6)"/>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="amount_paid_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_waived_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_writtenoff_derived" type="DECIMAL(19, 6)"/>
<column defaultValueNumeric="0.000000" name="amount_outstanding_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_paid_derived" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="waived" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="inactivated_on_date" type="date"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="153">
<createTable tableName="m_savings_account_charge_paid_by">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="savings_account_transaction_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="savings_account_charge_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="154">
<createTable tableName="m_savings_account_interest_rate_chart">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="savings_account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="name" type="VARCHAR(100)"/>
<column name="description" type="VARCHAR(200)"/>
<column name="from_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="end_date" type="date"/>
<column defaultValueBoolean="false" name="is_primary_grouping_by_amount" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="155">
<createTable tableName="m_savings_account_interest_rate_slab">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="savings_account_interest_rate_chart_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(200)"/>
<column defaultValueComputed="NULL" name="period_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="from_period" type="INT"/>
<column defaultValueComputed="NULL" name="to_period" type="INT"/>
<column defaultValueComputed="NULL" name="amount_range_from" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_range_to" type="DECIMAL(19, 6)"/>
<column name="annual_interest_rate" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="156">
<createTable tableName="m_savings_account_transaction">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="savings_account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="payment_detail_id" type="BIGINT"/>
<column name="transaction_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="is_reversed" type="boolean">
<constraints nullable="false"/>
</column>
<column name="transaction_date" type="date">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="overdraft_amount_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="balance_end_date_derived" type="date"/>
<column defaultValueComputed="NULL" name="balance_number_of_days_derived" type="INT"/>
<column defaultValueComputed="NULL" name="running_balance_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="cumulative_balance_derived" type="DECIMAL(19, 6)"/>
<column name="created_date" type="datetime">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="appuser_id" type="BIGINT"/>
<column defaultValueBoolean="false" name="is_manual" type="boolean"/>
<column defaultValueComputed="NULL" name="release_id_of_hold_amount" type="BIGINT"/>
<column defaultValueComputed="NULL" name="is_loan_disbursement" type="boolean"/>
<column name="ref_no" type="VARCHAR(128)">
<constraints unique="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="157">
<createTable tableName="m_savings_account_transaction_tax_details">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="savings_transaction_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="tax_component_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="158">
<createTable tableName="m_savings_interest_incentives">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="deposit_account_interest_rate_slab_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="entiry_type" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="attribute_name" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="condition_type" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="attribute_value" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="incentive_type" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="159">
<createTable tableName="m_savings_officer_assignment_history">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="savings_officer_id" type="BIGINT"/>
<column name="start_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="end_date" type="date"/>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="160">
<createTable tableName="m_savings_product">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)">
<constraints nullable="false" unique="true"/>
</column>
<column name="short_name" type="VARCHAR(4)">
<constraints nullable="false" unique="true"/>
</column>
<column name="description" type="VARCHAR(500)"/>
<column defaultValueNumeric="100" name="deposit_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column name="currency_digits" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="currency_multiplesof" type="SMALLINT"/>
<column name="nominal_annual_interest_rate" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="interest_compounding_period_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="4" name="interest_posting_period_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="interest_calculation_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="interest_calculation_days_in_year_type_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="min_required_opening_balance" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="lockin_period_frequency" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="lockin_period_frequency_enum" type="SMALLINT"/>
<column name="accounting_type" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="withdrawal_fee_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="withdrawal_fee_type_enum" type="SMALLINT"/>
<column defaultValueBoolean="true" name="withdrawal_fee_for_transfer" type="boolean"/>
<column defaultValueBoolean="false" name="allow_overdraft" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="overdraft_limit" type="DECIMAL(19, 6)"/>
<column defaultValueNumeric="0.000000" name="nominal_annual_interest_rate_overdraft" type="DECIMAL(19, 6)"/>
<column defaultValueNumeric="0.000000" name="min_overdraft_for_interest_calculation" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="min_required_balance" type="DECIMAL(19, 6)"/>
<column defaultValueBoolean="false" name="enforce_min_required_balance" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="min_balance_for_interest_calculation" type="DECIMAL(19, 6)"/>
<column defaultValueBoolean="false" name="withhold_tax" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="tax_group_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="is_dormancy_tracking_active" type="boolean"/>
<column defaultValueComputed="NULL" name="days_to_inactive" type="INT"/>
<column defaultValueComputed="NULL" name="days_to_dormancy" type="INT"/>
<column defaultValueComputed="NULL" name="days_to_escheat" type="INT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="161">
<createTable tableName="m_savings_product_charge">
<column name="savings_product_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="charge_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="162">
<createTable tableName="m_selfservice_beneficiaries_tpt">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="app_user_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="name" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="account_type" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="transfer_limit" type="BIGINT"/>
<column defaultValueBoolean="false" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="163">
<createTable tableName="m_selfservice_user_client_mapping">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="appuser_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="164">
<createTable tableName="m_share_account">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="account_no" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="external_id" type="VARCHAR(100)"/>
<column defaultValueNumeric="300" name="status_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="total_approved_shares" type="BIGINT"/>
<column defaultValueComputed="NULL" name="total_pending_shares" type="BIGINT"/>
<column name="submitted_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="submitted_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="approved_date" type="date"/>
<column defaultValueComputed="NULL" name="approved_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="rejected_date" type="date"/>
<column defaultValueComputed="NULL" name="rejected_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="activated_date" type="date"/>
<column defaultValueComputed="NULL" name="activated_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="closed_date" type="date"/>
<column defaultValueComputed="NULL" name="closed_userid" type="BIGINT"/>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column name="currency_digits" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="currency_multiplesof" type="SMALLINT"/>
<column name="savings_account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="minimum_active_period_frequency" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="minimum_active_period_frequency_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="lockin_period_frequency" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="lockin_period_frequency_enum" type="SMALLINT"/>
<column defaultValueBoolean="false" name="allow_dividends_inactive_clients" type="boolean"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="165">
<createTable tableName="m_share_account_charge">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="charge_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="charge_time_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column name="charge_calculation_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0" name="charge_payment_mode_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="calculation_percentage" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="calculation_on_amount" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="charge_amount_or_percentage" type="DECIMAL(19, 6)"/>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="amount_paid_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_waived_derived" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="amount_writtenoff_derived" type="DECIMAL(19, 6)"/>
<column defaultValueNumeric="0.000000" name="amount_outstanding_derived" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="is_paid_derived" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="false" name="waived" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="min_cap" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="max_cap" type="DECIMAL(19, 6)"/>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="166">
<createTable tableName="m_share_account_charge_paid_by">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="share_transaction_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="charge_transaction_id" type="BIGINT"/>
<column name="amount" type="DECIMAL(20, 2)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="167">
<createTable tableName="m_share_account_dividend_details">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="dividend_pay_out_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="status" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="savings_transaction_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="168">
<createTable tableName="m_share_account_transactions">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="transaction_date" type="date"/>
<column defaultValueComputed="NULL" name="total_shares" type="BIGINT"/>
<column defaultValueComputed="NULL" name="unit_price" type="DECIMAL(10, 2)"/>
<column defaultValueComputed="NULL" name="amount" type="DECIMAL(20, 2)"/>
<column defaultValueComputed="NULL" name="charge_amount" type="DECIMAL(20, 2)"/>
<column defaultValueComputed="NULL" name="amount_paid" type="DECIMAL(20, 2)"/>
<column defaultValueNumeric="300" name="status_enum" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="type_enum" type="SMALLINT"/>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="169">
<createTable tableName="m_share_product">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(200)">
<constraints nullable="false" unique="true"/>
</column>
<column name="short_name" type="VARCHAR(4)">
<constraints nullable="false"/>
</column>
<column name="external_id" type="VARCHAR(100)"/>
<column name="description" type="VARCHAR(500)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="start_date" type="datetime"/>
<column defaultValueComputed="NULL" name="end_date" type="datetime"/>
<column name="currency_code" type="VARCHAR(3)">
<constraints nullable="false"/>
</column>
<column name="currency_digits" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="currency_multiplesof" type="SMALLINT"/>
<column name="total_shares" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="issued_shares" type="BIGINT"/>
<column defaultValueComputed="NULL" name="totalsubscribed_shares" type="BIGINT"/>
<column name="unit_price" type="DECIMAL(10, 2)">
<constraints nullable="false"/>
</column>
<column name="capital_amount" type="DECIMAL(20, 2)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="minimum_client_shares" type="BIGINT"/>
<column name="nominal_client_shares" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="maximum_client_shares" type="BIGINT"/>
<column defaultValueComputed="NULL" name="minimum_active_period_frequency" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="minimum_active_period_frequency_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="lockin_period_frequency" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="lockin_period_frequency_enum" type="SMALLINT"/>
<column defaultValueBoolean="false" name="allow_dividends_inactive_clients" type="boolean"/>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column name="accounting_type" type="SMALLINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="170">
<createTable tableName="m_share_product_charge">
<column name="product_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="charge_id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="171">
<createTable tableName="m_share_product_dividend_pay_out">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="dividend_period_start_date" type="date">
<constraints nullable="false"/>
</column>
<column name="dividend_period_end_date" type="date">
<constraints nullable="false"/>
</column>
<column name="status" type="SMALLINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="172">
<createTable tableName="m_share_product_market_price">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="product_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="from_date" type="date"/>
<column name="share_value" type="DECIMAL(10, 2)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="173">
<createTable tableName="m_staff">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueBoolean="false" name="is_loan_officer" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="office_id" type="BIGINT"/>
<column name="firstname" type="VARCHAR(50)"/>
<column name="lastname" type="VARCHAR(50)"/>
<column name="display_name" type="VARCHAR(102)">
<constraints nullable="false" unique="true"/>
</column>
<column name="mobile_no" type="VARCHAR(50)">
<constraints unique="true"/>
</column>
<column name="external_id" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column defaultValueComputed="NULL" name="organisational_role_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="organisational_role_parent_staff_id" type="BIGINT"/>
<column defaultValueBoolean="true" name="is_active" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="joining_date" type="date"/>
<column defaultValueComputed="NULL" name="image_id" type="BIGINT"/>
<column name="email_address" type="VARCHAR(150)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="174">
<createTable tableName="m_staff_assignment_history">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="centre_id" type="BIGINT"/>
<column name="staff_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="start_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="end_date" type="date"/>
<column defaultValueComputed="NULL" name="createdby_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="created_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodified_date" type="datetime"/>
<column defaultValueComputed="NULL" name="lastmodifiedby_id" type="BIGINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="175">
<createTable tableName="m_survey_components">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="survey_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="a_key" type="VARCHAR(32)">
<constraints nullable="false"/>
</column>
<column name="a_text" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(4000)"/>
<column name="sequence_no" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="176">
<createTable tableName="m_survey_lookup_tables">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="survey_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="a_key" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="description" type="INT"/>
<column name="value_from" type="INT">
<constraints nullable="false"/>
</column>
<column name="value_to" type="INT">
<constraints nullable="false"/>
</column>
<column name="score" type="DECIMAL(5, 2)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="177">
<createTable tableName="m_survey_questions">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="survey_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="component_key" type="VARCHAR(32)"/>
<column name="a_key" type="VARCHAR(32)">
<constraints nullable="false"/>
</column>
<column name="a_text" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(4000)"/>
<column name="sequence_no" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="178">
<createTable tableName="m_survey_responses">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="question_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="a_text" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="a_value" type="INT">
<constraints nullable="false"/>
</column>
<column name="sequence_no" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="179">
<createTable tableName="m_survey_scorecards">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="survey_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="question_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="response_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="user_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="created_on" type="datetime"/>
<column name="a_value" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="180">
<createTable tableName="m_surveys">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="a_key" type="VARCHAR(32)">
<constraints nullable="false"/>
</column>
<column name="a_name" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(4000)"/>
<column name="country_code" type="VARCHAR(2)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="valid_from" type="datetime"/>
<column defaultValueComputed="NULL" name="valid_to" type="datetime"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="181">
<createTable tableName="m_tax_component">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="percentage" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="debit_account_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="debit_account_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="credit_account_type_enum" type="SMALLINT"/>
<column defaultValueComputed="NULL" name="credit_account_id" type="BIGINT"/>
<column name="start_date" type="date">
<constraints nullable="false"/>
</column>
<column name="createdby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created_date" type="datetime">
<constraints nullable="false"/>
</column>
<column name="lastmodifiedby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="lastmodified_date" type="datetime">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="182">
<createTable tableName="m_tax_component_history">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="tax_component_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="percentage" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="start_date" type="date">
<constraints nullable="false"/>
</column>
<column name="end_date" type="date">
<constraints nullable="false"/>
</column>
<column name="createdby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created_date" type="datetime">
<constraints nullable="false"/>
</column>
<column name="lastmodifiedby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="lastmodified_date" type="datetime">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="183">
<createTable tableName="m_tax_group">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="createdby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created_date" type="datetime">
<constraints nullable="false"/>
</column>
<column name="lastmodifiedby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="lastmodified_date" type="datetime">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="184">
<createTable tableName="m_tax_group_mappings">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="tax_group_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="tax_component_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="start_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="end_date" type="date"/>
<column name="createdby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created_date" type="datetime">
<constraints nullable="false"/>
</column>
<column name="lastmodifiedby_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="lastmodified_date" type="datetime">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="185">
<createTable tableName="m_tellers">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="debit_account_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="credit_account_id" type="BIGINT"/>
<column name="name" type="VARCHAR(50)">
<constraints nullable="false" unique="true"/>
</column>
<column name="description" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="valid_from" type="date"/>
<column defaultValueComputed="NULL" name="valid_to" type="date"/>
<column defaultValueComputed="NULL" name="state" type="SMALLINT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="186">
<createTable tableName="m_template">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(255)">
<constraints nullable="false" unique="true"/>
</column>
<column name="text" type="LONGTEXT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="entity" type="INT"/>
<column defaultValueComputed="NULL" name="type" type="INT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="187">
<createTable tableName="m_template_m_templatemappers">
<column name="m_template_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="mappers_id" type="BIGINT">
<constraints nullable="false" unique="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="188">
<createTable tableName="m_templatemappers">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="mapperkey" type="VARCHAR(255)"/>
<column defaultValueComputed="NULL" name="mapperorder" type="INT"/>
<column name="mappervalue" type="VARCHAR(255)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="189">
<createTable tableName="m_trial_balance">
<column name="office_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="account_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column name="entry_date" type="date">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="created_date" type="date"/>
<column name="closing_balance" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="190">
<createTable tableName="m_working_days">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="recurrence" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="repayment_rescheduling_enum" type="SMALLINT"/>
<column defaultValueBoolean="false" name="extend_term_daily_repayments" type="boolean"/>
<column defaultValueBoolean="false" name="extend_term_holiday_repayment" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="191">
<createTable tableName="mix_taxonomy">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="namespace_id" type="INT"/>
<column name="dimension" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="type" type="INT"/>
<column name="description" type="VARCHAR(1000)"/>
<column defaultValueComputed="NULL" name="need_mapping" type="boolean"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="192">
<createTable tableName="mix_taxonomy_mapping">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValue="" name="identifier" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="config" type="VARCHAR(200)"/>
<column defaultValueComputed="NULL" name="last_update_date" type="datetime"/>
<column name="currency" type="VARCHAR(11)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="193">
<createTable tableName="mix_xbrl_namespace">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValue="" name="prefix" type="VARCHAR(20)">
<constraints nullable="false" unique="true"/>
</column>
<column name="url" type="VARCHAR(100)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="194">
<createTable tableName="notification_generator">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="object_type" type="TEXT"/>
<column defaultValueComputed="NULL" name="object_identifier" type="BIGINT"/>
<column name="action" type="TEXT"/>
<column defaultValueComputed="NULL" name="actor" type="BIGINT"/>
<column defaultValueBoolean="false" name="is_system_generated" type="boolean"/>
<column name="notification_content" type="TEXT"/>
<column defaultValueComputed="NULL" name="created_at" type="datetime"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="195">
<createTable tableName="notification_mapper">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="notification_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="user_id" type="BIGINT"/>
<column defaultValueBoolean="false" name="is_read" type="boolean"/>
<column defaultValueComputed="NULL" name="created_at" type="datetime"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="196">
<createTable tableName="oauth_access_token">
<column name="token_id" type="VARCHAR(256)"/>
<column defaultValueComputed="NULL" name="token" type="BLOB"/>
<column name="authentication_id" type="VARCHAR(256)"/>
<column name="user_name" type="VARCHAR(256)"/>
<column name="client_id" type="VARCHAR(256)"/>
<column defaultValueComputed="NULL" name="authentication" type="BLOB"/>
<column name="refresh_token" type="VARCHAR(256)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="197">
<createTable tableName="oauth_client_details">
<column name="client_id" type="VARCHAR(128)">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="resource_ids" type="VARCHAR(256)"/>
<column name="client_secret" type="VARCHAR(256)"/>
<column name="scope" type="VARCHAR(256)"/>
<column name="authorized_grant_types" type="VARCHAR(256)"/>
<column name="web_server_redirect_uri" type="VARCHAR(256)"/>
<column name="authorities" type="VARCHAR(256)"/>
<column defaultValueComputed="NULL" name="access_token_validity" type="INT"/>
<column defaultValueComputed="NULL" name="refresh_token_validity" type="INT"/>
<column name="additional_information" type="VARCHAR(4096)"/>
<column defaultValueBoolean="false" name="autoapprove" type="boolean"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="198">
<createTable tableName="oauth_refresh_token">
<column name="token_id" type="VARCHAR(256)"/>
<column defaultValueComputed="NULL" name="token" type="BLOB"/>
<column defaultValueComputed="NULL" name="authentication" type="BLOB"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="199">
<createTable tableName="ppi_likelihoods">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="code" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="name" type="VARCHAR(250)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="200">
<createTable tableName="ppi_likelihoods_ppi">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="likelihood_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="ppi_name" type="VARCHAR(250)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="100" name="enabled" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="201">
<createTable tableName="ppi_scores">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="score_from" type="INT">
<constraints nullable="false"/>
</column>
<column name="score_to" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="202">
<createTable tableName="r_enum_value">
<column name="enum_name" type="VARCHAR(100)">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="enum_id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="enum_message_property" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="enum_value" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="enum_type" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="203">
<createTable tableName="ref_loan_transaction_processing_strategy">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="code" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column name="name" type="VARCHAR(255)"/>
<column defaultValueComputed="NULL" name="sort_order" type="INT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="204">
<createTable tableName="request_audit_table">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="lastname" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="username" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="mobile_number" type="VARCHAR(50)"/>
<column name="firstname" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="authentication_token" type="VARCHAR(100)"/>
<column name="password" type="VARCHAR(250)">
<constraints nullable="false"/>
</column>
<column name="email" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created_date" type="date">
<constraints nullable="false"/>
</column>
<column name="account_number" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="205">
<createTable tableName="rpt_sequence">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="206">
<createTable tableName="scheduled_email_campaign">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="campaign_name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="campaign_type" type="INT">
<constraints nullable="false"/>
</column>
<column name="businessRule_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="param_value" type="TEXT"/>
<column name="status_enum" type="INT">
<constraints nullable="false"/>
</column>
<column name="email_subject" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="email_message" type="TEXT">
<constraints nullable="false"/>
</column>
<column name="email_attachment_file_format" type="VARCHAR(10)"/>
<column defaultValueComputed="NULL" name="stretchy_report_id" type="INT"/>
<column name="stretchy_report_param_map" type="TEXT"/>
<column defaultValueComputed="NULL" name="closedon_date" type="date"/>
<column defaultValueComputed="NULL" name="closedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="submittedon_date" type="date"/>
<column defaultValueComputed="NULL" name="submittedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="approvedon_date" type="date"/>
<column defaultValueComputed="NULL" name="approvedon_userid" type="BIGINT"/>
<column name="recurrence" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="next_trigger_date" type="datetime"/>
<column defaultValueComputed="NULL" name="last_trigger_date" type="datetime"/>
<column defaultValueComputed="NULL" name="recurrence_start_date" type="datetime"/>
<column defaultValueBoolean="true" name="is_visible" type="boolean"/>
<column name="previous_run_error_log" type="TEXT"/>
<column name="previous_run_error_message" type="TEXT"/>
<column name="previous_run_status" type="VARCHAR(10)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="207">
<createTable tableName="scheduled_email_configuration">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(50)">
<constraints nullable="false" unique="true"/>
</column>
<column name="value" type="VARCHAR(200)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="208">
<createTable tableName="scheduled_email_messages_outbound">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="group_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="client_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="staff_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="email_campaign_id" type="BIGINT"/>
<column defaultValueNumeric="100" name="status_enum" type="INT">
<constraints nullable="false"/>
</column>
<column name="email_address" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="email_subject" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="message" type="TEXT">
<constraints nullable="false"/>
</column>
<column name="campaign_name" type="VARCHAR(200)"/>
<column defaultValueComputed="NULL" name="submittedon_date" type="date"/>
<column name="error_message" type="TEXT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="209">
<createTable tableName="scheduler_detail">
<column autoIncrement="true" name="id" type="SMALLINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueBoolean="false" name="is_suspended" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="execute_misfired_jobs" type="boolean">
<constraints nullable="false"/>
</column>
<column defaultValueBoolean="true" name="reset_scheduler_on_bootup" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="211">
<createTable tableName="sms_campaign">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="campaign_name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="campaign_type" type="INT">
<constraints nullable="false"/>
</column>
<column name="campaign_trigger_type" type="INT">
<constraints nullable="false"/>
</column>
<column name="report_id" type="INT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="provider_id" type="BIGINT"/>
<column name="param_value" type="TEXT"/>
<column name="status_enum" type="INT">
<constraints nullable="false"/>
</column>
<column name="message" type="TEXT">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="submittedon_date" type="date"/>
<column defaultValueComputed="NULL" name="submittedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="approvedon_date" type="date"/>
<column defaultValueComputed="NULL" name="approvedon_userid" type="BIGINT"/>
<column defaultValueComputed="NULL" name="closedon_date" type="date"/>
<column defaultValueComputed="NULL" name="closedon_userid" type="BIGINT"/>
<column name="recurrence" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="next_trigger_date" type="datetime"/>
<column defaultValueComputed="NULL" name="last_trigger_date" type="datetime"/>
<column defaultValueComputed="NULL" name="recurrence_start_date" type="datetime"/>
<column defaultValueBoolean="true" name="is_visible" type="boolean"/>
<column defaultValueBoolean="false" name="is_notification" type="boolean"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="212">
<createTable tableName="sms_messages_outbound">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column defaultValueComputed="NULL" name="group_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="client_id" type="BIGINT"/>
<column defaultValueComputed="NULL" name="staff_id" type="BIGINT"/>
<column defaultValueNumeric="100" name="status_enum" type="INT">
<constraints nullable="false"/>
</column>
<column name="mobile_no" type="VARCHAR(50)"/>
<column name="message" type="VARCHAR(1000)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="campaign_id" type="BIGINT"/>
<column name="external_id" type="VARCHAR(100)"/>
<column defaultValueComputed="NULL" name="submittedon_date" type="date"/>
<column defaultValueComputed="NULL" name="delivered_on_date" type="datetime"/>
<column defaultValueBoolean="false" name="is_notification" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="213">
<createTable tableName="stretchy_parameter">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="parameter_name" type="VARCHAR(45)">
<constraints nullable="false" unique="true"/>
</column>
<column name="parameter_variable" type="VARCHAR(45)"/>
<column name="parameter_label" type="VARCHAR(45)">
<constraints nullable="false"/>
</column>
<column name="parameter_displayType" type="VARCHAR(45)">
<constraints nullable="false"/>
</column>
<column name="parameter_FormatType" type="VARCHAR(10)">
<constraints nullable="false"/>
</column>
<column name="parameter_default" type="VARCHAR(45)">
<constraints nullable="false"/>
</column>
<column name="special" type="VARCHAR(1)"/>
<column name="selectOne" type="VARCHAR(1)"/>
<column name="selectAll" type="VARCHAR(1)"/>
<column name="parameter_sql" type="TEXT"/>
<column defaultValueComputed="NULL" name="parent_id" type="INT"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="214">
<createTable tableName="stretchy_report">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="report_name" type="VARCHAR(100)">
<constraints nullable="false" unique="true"/>
</column>
<column name="report_type" type="VARCHAR(20)">
<constraints nullable="false"/>
</column>
<column name="report_subtype" type="VARCHAR(20)"/>
<column name="report_category" type="VARCHAR(45)"/>
<column name="report_sql" type="TEXT"/>
<column name="description" type="TEXT"/>
<column defaultValueBoolean="false" name="core_report" type="boolean"/>
<column defaultValueBoolean="false" name="use_report" type="boolean"/>
<column defaultValueBoolean="false" name="self_service_user_report" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="215">
<createTable tableName="stretchy_report_parameter">
<column autoIncrement="true" name="id" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="report_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="parameter_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="report_parameter_name" type="VARCHAR(45)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="216">
<createTable tableName="topic">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="title" type="VARCHAR(100)">
<constraints nullable="false" unique="true"/>
</column>
<column defaultValueComputed="NULL" name="enabled" type="boolean"/>
<column name="entity_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="entity_type" type="TEXT">
<constraints nullable="false"/>
</column>
<column name="member_type" type="TEXT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="217">
<createTable tableName="topic_subscriber">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="topic_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="user_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="subscription_date" type="date">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="218">
<createTable tableName="twofactor_access_token">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="token" type="VARCHAR(32)">
<constraints nullable="false"/>
</column>
<column name="appuser_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="valid_from" type="datetime">
<constraints nullable="false"/>
</column>
<column name="valid_to" type="datetime">
<constraints nullable="false"/>
</column>
<column name="enabled" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="219">
<createTable tableName="twofactor_configuration">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(40)">
<constraints nullable="false" unique="true"/>
</column>
<column name="value" type="VARCHAR(1024)"/>
</createTable>
</changeSet>
<changeSet author="fineract" id="220">
<createTable tableName="x_registered_table">
<column name="registered_table_name" type="VARCHAR(50)">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="application_table_name" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="entity_subtype" type="VARCHAR(50)"/>
<column defaultValueNumeric="100" name="category" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="221">
<createTable tableName="x_table_column_code_mappings">
<column name="column_alias_name" type="VARCHAR(50)">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="code_id" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="222">
<addUniqueConstraint columnNames="acc_rule_id, tag_id, acc_type_enum" constraintName="UNIQUE_ACCOUNT_RULE_TAGS"
tableName="acc_rule_tags"/>
</changeSet>
<changeSet author="fineract" id="223">
<addUniqueConstraint columnNames="client_id, group_id, role_cv_id" constraintName="UNIQUE_GROUP_ROLES"
tableName="m_group_roles"/>
</changeSet>
<changeSet author="fineract" id="224">
<addUniqueConstraint columnNames="appuser_id, client_id" constraintName="appuser_id_client_id"
tableName="m_selfservice_user_client_mapping"/>
<addUniqueConstraint columnNames="client_id" constraintName="unique_self_client"
tableName="m_selfservice_user_client_mapping"/>
</changeSet>
<changeSet author="fineract" id="225">
<addUniqueConstraint columnNames="organisation_creditbureau_id, loan_product_id" constraintName="cblpunique_key"
tableName="m_creditbureau_loanproduct_mapping"/>
</changeSet>
<changeSet author="fineract" id="226">
<addUniqueConstraint columnNames="code_id, code_value" constraintName="code_value" tableName="m_code_value"/>
</changeSet>
<changeSet author="fineract" id="227">
<addUniqueConstraint columnNames="deposit_product_id, interest_rate_chart_id"
constraintName="deposit_product_id_interest_rate_chart_id"
tableName="m_deposit_product_interest_rate_chart"/>
</changeSet>
<changeSet author="fineract" id="228">
<addUniqueConstraint columnNames="enum_name, enum_message_property" constraintName="enum_message_property"
tableName="r_enum_value"/>
</changeSet>
<changeSet author="fineract" id="229">
<addUniqueConstraint columnNames="enum_name, enum_value" constraintName="enum_value" tableName="r_enum_value"/>
</changeSet>
<changeSet author="fineract" id="230">
<addUniqueConstraint columnNames="external_id, level_id" constraintName="uk_m_group_external_id" tableName="m_group"/>
</changeSet>
<changeSet author="fineract" id="231">
<addUniqueConstraint columnNames="from_entity_type, to_entity_type, code_name"
constraintName="from_entity_type_to_entity_type_code_name" tableName="m_entity_relation"/>
</changeSet>
<changeSet author="fineract" id="232">
<addUniqueConstraint columnNames="name, from_date" constraintName="holiday_name" tableName="m_holiday"/>
</changeSet>
<changeSet author="fineract" id="233">
<addUniqueConstraint
columnNames="entity_type, entity_id, access_type_code_value_id, second_entity_type, second_entity_id"
constraintName="id_uniq_m_entity_to_entity_access" tableName="m_entity_to_entity_access"/>
</changeSet>
<changeSet author="fineract" id="234">
<addUniqueConstraint columnNames="configkey, organisation_creditbureau_id" constraintName="mcbconfig"
tableName="m_creditbureau_configuration"/>
</changeSet>
<changeSet author="fineract" id="235">
<addUniqueConstraint columnNames="alias, creditbureau_id" constraintName="morgcb"
tableName="m_organisation_creditbureau"/>
</changeSet>
<changeSet author="fineract" id="236">
<addUniqueConstraint columnNames="display_name, level_id" constraintName="name" tableName="m_group"/>
</changeSet>
<changeSet author="fineract" id="237">
<addUniqueConstraint columnNames="name, app_user_id, is_active" constraintName="uk_m_selfservice_beneficiaries_tpt_name"
tableName="m_selfservice_beneficiaries_tpt"/>
</changeSet>
<changeSet author="fineract" id="238">
<addUniqueConstraint columnNames="office_id, closing_date" constraintName="office_id_closing_date"
tableName="acc_gl_closure"/>
</changeSet>
<changeSet author="fineract" id="239">
<addUniqueConstraint columnNames="rel_id, from_id, to_id" constraintName="rel_id_from_id_to_id"
tableName="m_entity_to_entity_mapping"/>
</changeSet>
<changeSet author="fineract" id="240">
<addUniqueConstraint columnNames="report_id, parameter_id" constraintName="report_parameter_unique"
tableName="stretchy_report_parameter"/>
</changeSet>
<changeSet author="fineract" id="241">
<addUniqueConstraint columnNames="token, appuser_id" constraintName="token_appuser_UNIQUE"
tableName="twofactor_access_token"/>
</changeSet>
<changeSet author="fineract" id="242">
<addUniqueConstraint columnNames="account_id, type" constraintName="uk_interop_identifier_account"
tableName="interop_identifier"/>
</changeSet>
<changeSet author="fineract" id="243">
<addUniqueConstraint columnNames="type, a_value, sub_value_or_type" constraintName="uk_interop_identifier_value"
tableName="interop_identifier"/>
</changeSet>
<changeSet author="fineract" id="244">
<addUniqueConstraint columnNames="name, product, country, implementationKey" constraintName="unique impl"
tableName="m_creditbureau"/>
</changeSet>
<changeSet author="fineract" id="245">
<addUniqueConstraint columnNames="client_id, document_type_id, active"
constraintName="unique_active_client_identifier" tableName="m_client_identifier"/>
</changeSet>
<changeSet author="fineract" id="246">
<addUniqueConstraint columnNames="calendar_instance_id, meeting_date"
constraintName="unique_calendar_instance_id_meeting_date" tableName="m_meeting"/>
</changeSet>
<changeSet author="fineract" id="247">
<addUniqueConstraint columnNames="client_id, meeting_id" constraintName="unique_client_meeting_attendance"
tableName="m_client_attendance"/>
</changeSet>
<changeSet author="fineract" id="248">
<addUniqueConstraint columnNames="application_table_name, x_registered_table_name, status_enum, product_id"
constraintName="unique_entity_check" tableName="m_entity_datatable_check"/>
</changeSet>
<changeSet author="fineract" id="249">
<addUniqueConstraint columnNames="document_type_id, document_key" constraintName="unique_identifier_key"
tableName="m_client_identifier"/>
</changeSet>
<changeSet author="fineract" id="250">
<addUniqueConstraint columnNames="pocket_id, account_id, account_type" constraintName="unique_pocket_mapping"
tableName="m_pocket_accounts_mapping"/>
</changeSet>
<changeSet author="fineract" id="251">
<createIndex indexName="FK1E37728B783C5C25" tableName="m_office_transaction">
<column defaultValueComputed="NULL" name="from_office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="252">
<createIndex indexName="FK1E37728B93C6C1B6" tableName="m_office_transaction">
<column defaultValueComputed="NULL" name="to_office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="253">
<createIndex indexName="FK1_m_client_gender_m_code_value" tableName="m_client">
<column defaultValueComputed="NULL" name="gender_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="254">
<createIndex indexName="FK1_request_audit_table_m_client" tableName="request_audit_table">
<column name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="255">
<createIndex indexName="FK2291C477E2551DCC" tableName="m_office">
<column defaultValueComputed="NULL" name="parent_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="256">
<createIndex indexName="FK488B92AA40BE0710" tableName="m_loan_repayment_schedule">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="257">
<createIndex indexName="FK7662CE5915CEC7AB" tableName="m_appuser_role">
<column name="role_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="258">
<createIndex indexName="FK7662CE59B4100309" tableName="m_appuser_role">
<column name="appuser_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="259">
<createIndex indexName="FK7C885877240145" tableName="m_loan">
<column defaultValueComputed="NULL" name="fund_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="260">
<createIndex indexName="FK7C9708924D26803" tableName="m_note">
<column defaultValueComputed="NULL" name="loan_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="261">
<createIndex indexName="FK7C9708940BE0710" tableName="m_note">
<column defaultValueComputed="NULL" name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="262">
<createIndex indexName="FK7C97089541F0A56" tableName="m_note">
<column defaultValueComputed="NULL" name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="263">
<createIndex indexName="FK7C970897179A0CB" tableName="m_note">
<column defaultValueComputed="NULL" name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="264">
<createIndex indexName="FK7C970898F889C3F" tableName="m_note">
<column defaultValueComputed="NULL" name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="265">
<createIndex indexName="FK8DEDB048103B544B" tableName="m_role_permission">
<column name="permission_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="266">
<createIndex indexName="FK8DEDB04815CEC7AB" tableName="m_role_permission">
<column name="role_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="267">
<createIndex indexName="FKA6A8A7D77240145" tableName="m_product_loan">
<column defaultValueComputed="NULL" name="fund_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="268">
<createIndex indexName="FKB3D587CE0DD567A" tableName="m_appuser">
<column defaultValueComputed="NULL" name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="269">
<createIndex indexName="FKB6F935D87179A0CB" tableName="m_loan">
<column defaultValueComputed="NULL" name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="270">
<createIndex indexName="FKB6F935D8C8D4B434" tableName="m_loan">
<column defaultValueComputed="NULL" name="product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="271">
<createIndex indexName="FKCAMPAIGN00000001" tableName="sms_messages_outbound">
<column defaultValueComputed="NULL" name="campaign_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="272">
<createIndex indexName="FKCE00CAB3E0DD567A" tableName="m_client">
<column name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="273">
<createIndex indexName="FKCFCEA42640BE0710" tableName="m_loan_transaction">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="274">
<createIndex indexName="FKCFCEA42640BE071Z" tableName="m_code_value">
<column name="code_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="275">
<createIndex indexName="FKCLIENT00000001" tableName="sms_messages_outbound">
<column defaultValueComputed="NULL" name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="276">
<createIndex indexName="FKDARD00000000000001" tableName="m_deposit_account_recurring_detail">
<column defaultValueNumeric="0" name="savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="277">
<createIndex indexName="FKDATP00000000000001" tableName="m_deposit_account_term_and_preclosure">
<column defaultValueNumeric="0" name="savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="278">
<createIndex indexName="FKDPIRC00000000000002" tableName="m_deposit_product_interest_rate_chart">
<column name="interest_rate_chart_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="279">
<createIndex indexName="FKDPRD00000000000001" tableName="m_deposit_product_recurring_detail">
<column defaultValueNumeric="0" name="savings_product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="280">
<createIndex indexName="FKDPTP00000000000001" tableName="m_deposit_product_term_and_preclosure">
<column defaultValueNumeric="0" name="savings_product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="281">
<createIndex indexName="FKGLACC000000002" tableName="acc_gl_account">
<column defaultValueComputed="NULL" name="tag_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="282">
<createIndex indexName="FKGROUP000000001" tableName="sms_messages_outbound">
<column defaultValueComputed="NULL" name="group_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="283">
<createIndex indexName="FKGroupRoleClientId" tableName="m_group_roles">
<column defaultValueComputed="NULL" name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="284">
<createIndex indexName="FKGroupRoleGroupId" tableName="m_group_roles">
<column defaultValueComputed="NULL" name="group_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="285">
<createIndex indexName="FKIRS00000000000001" tableName="m_interest_rate_slab">
<column name="interest_rate_chart_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="286">
<createIndex indexName="FKMSS0000000001" tableName="m_mandatory_savings_schedule">
<column name="savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="287">
<createIndex indexName="FKSA00000000000001" tableName="m_savings_account">
<column defaultValueComputed="NULL" name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="288">
<createIndex indexName="FKSA00000000000002" tableName="m_savings_account">
<column defaultValueComputed="NULL" name="group_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="289">
<createIndex indexName="FKSA00000000000003" tableName="m_savings_account">
<column defaultValueComputed="NULL" name="product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="290">
<createIndex indexName="FKSAIRC00000000000001" tableName="m_savings_account_interest_rate_chart">
<column name="savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="291">
<createIndex indexName="FKSAIRS00000000000001" tableName="m_savings_account_interest_rate_slab">
<column name="savings_account_interest_rate_chart_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="292">
<createIndex indexName="FKSAT0000000001" tableName="m_savings_account_transaction">
<column name="savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="293">
<createIndex indexName="FKSTAFF000000001" tableName="sms_messages_outbound">
<column defaultValueComputed="NULL" name="staff_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="294">
<createIndex indexName="FK_ACC_0000000001" tableName="acc_gl_account">
<column defaultValueComputed="NULL" name="parent_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="295">
<createIndex indexName="FK_M_LOAN_RATE_RATE" tableName="m_loan_rate">
<column name="rate_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="296">
<createIndex indexName="FK_M_PRODUCT_LOAN_RATE_RATE" tableName="m_product_loan_rate">
<column name="rate_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="297">
<createIndex indexName="FK_M_RATE_APPROVE_USER" tableName="m_rate">
<column defaultValueComputed="NULL" name="approve_user"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="298">
<createIndex indexName="FK_M_RATE_CREATE_USER" tableName="m_rate">
<column name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="299">
<createIndex indexName="FK__m_loan_charge" tableName="m_loan_charge_paid_by">
<column name="loan_charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="300">
<createIndex indexName="FK__m_loan_reschedule_request"
tableName="m_loan_reschedule_request_term_variations_mapping">
<column name="loan_reschedule_request_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="301">
<createIndex indexName="FK__m_loan_term_variations"
tableName="m_loan_reschedule_request_term_variations_mapping">
<column name="loan_term_variations_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="302">
<createIndex indexName="FK__m_loan_transaction" tableName="m_loan_charge_paid_by">
<column name="loan_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="303">
<createIndex indexName="FK__m_savings_account_charge" tableName="m_savings_account_charge_paid_by">
<column name="savings_account_charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="304">
<createIndex indexName="FK__m_savings_account_transaction" tableName="m_savings_account_charge_paid_by">
<column name="savings_account_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="305">
<createIndex indexName="FK_acc_accounting_rule_acc_gl_account_credit" tableName="acc_accounting_rule">
<column defaultValueComputed="NULL" name="credit_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="306">
<createIndex indexName="FK_acc_accounting_rule_acc_gl_account_debit" tableName="acc_accounting_rule">
<column defaultValueComputed="NULL" name="debit_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="307">
<createIndex indexName="FK_acc_accounting_rule_id" tableName="acc_rule_tags">
<column name="acc_rule_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="308">
<createIndex indexName="FK_acc_accounting_rule_m_office" tableName="acc_accounting_rule">
<column defaultValueComputed="NULL" name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="309">
<createIndex indexName="FK_acc_gl_closure_m_appuser" tableName="acc_gl_closure">
<column defaultValueComputed="NULL" name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="310">
<createIndex indexName="FK_acc_gl_closure_m_appuser_2" tableName="acc_gl_closure">
<column defaultValueComputed="NULL" name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="311">
<createIndex indexName="FK_acc_gl_closure_m_office" tableName="acc_gl_closure">
<column name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="312">
<createIndex indexName="FK_acc_gl_journal_entry_acc_gl_account" tableName="acc_gl_journal_entry">
<column name="account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="313">
<createIndex indexName="FK_acc_gl_journal_entry_acc_gl_journal_entry" tableName="acc_gl_journal_entry">
<column defaultValueComputed="NULL" name="reversal_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="314">
<createIndex indexName="FK_acc_gl_journal_entry_m_appuser" tableName="acc_gl_journal_entry">
<column name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="315">
<createIndex indexName="FK_acc_gl_journal_entry_m_appuser_2" tableName="acc_gl_journal_entry">
<column name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="316">
<createIndex indexName="FK_acc_gl_journal_entry_m_client_transaction" tableName="acc_gl_journal_entry">
<column defaultValueComputed="NULL" name="client_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="317">
<createIndex indexName="FK_acc_gl_journal_entry_m_loan_transaction" tableName="acc_gl_journal_entry">
<column defaultValueComputed="NULL" name="loan_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="318">
<createIndex indexName="FK_acc_gl_journal_entry_m_office" tableName="acc_gl_journal_entry">
<column name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="319">
<createIndex indexName="FK_acc_gl_journal_entry_m_payment_detail" tableName="acc_gl_journal_entry">
<column defaultValueComputed="NULL" name="payment_details_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="320">
<createIndex indexName="FK_acc_gl_journal_entry_m_savings_account_transaction" tableName="acc_gl_journal_entry">
<column defaultValueComputed="NULL" name="savings_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="321">
<createIndex indexName="FK_acc_gl_journal_entry_m_share_account_transaction" tableName="acc_gl_journal_entry">
<column defaultValueComputed="NULL" name="share_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="322">
<createIndex indexName="FK_acc_product_mapping_m_charge" tableName="acc_product_mapping">
<column defaultValueComputed="NULL" name="charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="323">
<createIndex indexName="FK_acc_product_mapping_m_payment_type" tableName="acc_product_mapping">
<column defaultValueComputed="NULL" name="payment_type"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="324">
<createIndex indexName="FK_access_type_code_m_code_value" tableName="m_entity_to_entity_access">
<column name="access_type_code_value_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="325">
<createIndex indexName="FK_additional_details_repayment_schedule_id"
tableName="m_loan_interest_recalculation_additional_details">
<column name="loan_repayment_schedule_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="326">
<createIndex indexName="FK_approvedon_userid" tableName="m_loan">
<column defaultValueComputed="NULL" name="approvedon_userid"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="327">
<createIndex indexName="FK_c_external_service_properties_c_external_service"
tableName="c_external_service_properties">
<column name="external_service_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="328">
<createIndex indexName="FK_closedon_userid" tableName="m_loan">
<column defaultValueComputed="NULL" name="closedon_userid"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="329">
<createIndex indexName="FK_collateral_code_value" tableName="m_loan_collateral">
<column name="type_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="330">
<createIndex indexName="FK_collateral_m_loan" tableName="m_loan_collateral">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="331">
<createIndex indexName="FK_deposit_on_hold_transaction_m_savings_account"
tableName="m_deposit_account_on_hold_transaction">
<column name="savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="332">
<createIndex indexName="FK_disbursedon_userid" tableName="m_loan">
<column defaultValueComputed="NULL" name="disbursedon_userid"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="333">
<createIndex indexName="FK_glim_id" tableName="m_loan">
<column defaultValueComputed="NULL" name="glim_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="334">
<createIndex indexName="FK_group_id" tableName="glim_accounts">
<column defaultValueNumeric="0" name="group_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="335">
<createIndex indexName="FK_grouprole_m_codevalue" tableName="m_group_roles">
<column defaultValueComputed="NULL" name="role_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="336">
<createIndex indexName="FK_gsim_group_id" tableName="gsim_accounts">
<column defaultValueNumeric="0" name="group_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="337">
<createIndex indexName="FK_gsim_id" tableName="m_savings_account">
<column defaultValueComputed="NULL" name="gsim_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="338">
<createIndex indexName="FK_guarantee_details_loan_product" tableName="m_product_loan_guarantee_details">
<column name="loan_product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="339">
<createIndex indexName="FK_guarantor_transaction_guarantor_fund_detail" tableName="m_guarantor_transaction">
<column name="guarantor_fund_detail_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="340">
<createIndex indexName="FK_guarantor_transaction_m_deposit_account_on_hold_transaction"
tableName="m_guarantor_transaction">
<column name="deposit_on_hold_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="341">
<createIndex indexName="FK_guarantor_transaction_m_loan_transaction" tableName="m_guarantor_transaction">
<column defaultValueComputed="NULL" name="loan_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="342">
<createIndex indexName="FK_job_id" tableName="job_parameters">
<column name="job_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="343">
<createIndex indexName="FK_loan_charge_id_charge_schedule" tableName="m_loan_installment_charge">
<column name="loan_charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="344">
<createIndex indexName="FK_loan_disbursement_detail_loan_id" tableName="m_loan_disbursement_detail">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="345">
<createIndex indexName="FK_loan_id_m_loan_id" tableName="m_loan_term_variations">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="346">
<createIndex indexName="FK_loan_ltp_strategy" tableName="m_loan">
<column defaultValueComputed="NULL" name="loan_transaction_strategy_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="347">
<createIndex indexName="FK_loan_schedule_id_charge_schedule" tableName="m_loan_installment_charge">
<column name="loan_schedule_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="348">
<createIndex indexName="FK_ltp_strategy" tableName="m_product_loan">
<column defaultValueComputed="NULL" name="loan_transaction_strategy_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="349">
<createIndex indexName="FK_m_account_transfer_details_from_client" tableName="m_account_transfer_details">
<column defaultValueComputed="NULL" name="from_client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="350">
<createIndex indexName="FK_m_account_transfer_details_from_loan_account" tableName="m_account_transfer_details">
<column defaultValueComputed="NULL" name="from_loan_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="351">
<createIndex indexName="FK_m_account_transfer_details_from_office" tableName="m_account_transfer_details">
<column name="from_office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="352">
<createIndex indexName="FK_m_account_transfer_details_from_savings_account"
tableName="m_account_transfer_details">
<column defaultValueComputed="NULL" name="from_savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="353">
<createIndex indexName="FK_m_account_transfer_details_to_client" tableName="m_account_transfer_details">
<column defaultValueComputed="NULL" name="to_client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="354">
<createIndex indexName="FK_m_account_transfer_details_to_loan_account" tableName="m_account_transfer_details">
<column defaultValueComputed="NULL" name="to_loan_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="355">
<createIndex indexName="FK_m_account_transfer_details_to_office" tableName="m_account_transfer_details">
<column name="to_office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="356">
<createIndex indexName="FK_m_account_transfer_details_to_savings_account"
tableName="m_account_transfer_details">
<column defaultValueComputed="NULL" name="to_savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="357">
<createIndex indexName="FK_m_account_transfer_standing_instructions_history"
tableName="m_account_transfer_standing_instructions_history">
<column name="standing_instruction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="358">
<createIndex indexName="FK_m_account_transfer_transaction_account_detail"
tableName="m_account_transfer_transaction">
<column name="account_transfer_details_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="359">
<createIndex indexName="FK_m_account_transfer_transaction_from_m_loan_transaction"
tableName="m_account_transfer_transaction">
<column defaultValueComputed="NULL" name="from_loan_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="360">
<createIndex indexName="FK_m_account_transfer_transaction_from_m_savings_transaction"
tableName="m_account_transfer_transaction">
<column defaultValueComputed="NULL" name="from_savings_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="361">
<createIndex indexName="FK_m_account_transfer_transaction_to_m_loan_transaction"
tableName="m_account_transfer_transaction">
<column defaultValueComputed="NULL" name="to_loan_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="362">
<createIndex indexName="FK_m_account_transfer_transaction_to_m_savings_transaction"
tableName="m_account_transfer_transaction">
<column defaultValueComputed="NULL" name="to_savings_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="363">
<createIndex indexName="FK_m_calendar_m_calendar_history" tableName="m_calendar_history">
<column name="calendar_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="364">
<createIndex indexName="FK_m_calendar_m_calendar_instance" tableName="m_calendar_instance">
<column name="calendar_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="365">
<createIndex indexName="FK_m_charge_acc_gl_account" tableName="m_charge">
<column defaultValueComputed="NULL" name="income_or_liability_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="366">
<createIndex indexName="FK_m_charge_m_tax_group" tableName="m_charge">
<column defaultValueComputed="NULL" name="tax_group_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="367">
<createIndex indexName="FK_m_checker_m_appuser" tableName="m_portfolio_command_source">
<column defaultValueComputed="NULL" name="checker_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="368">
<createIndex indexName="FK_m_client_charge_m_charge" tableName="m_client_charge">
<column name="charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="369">
<createIndex indexName="FK_m_client_charge_m_client" tableName="m_client_charge">
<column name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="370">
<createIndex indexName="FK_m_client_charge_paid_by_m_client_charge" tableName="m_client_charge_paid_by">
<column name="client_charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="371">
<createIndex indexName="FK_m_client_charge_paid_by_m_client_transaction" tableName="m_client_charge_paid_by">
<column name="client_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="372">
<createIndex indexName="FK_m_client_classification_m_code_value" tableName="m_client">
<column defaultValueComputed="NULL" name="client_classification_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="373">
<createIndex indexName="FK_m_client_document_m_client" tableName="m_client_identifier">
<column name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="374">
<createIndex indexName="FK_m_client_document_m_code_value" tableName="m_client_identifier">
<column name="document_type_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="375">
<createIndex indexName="FK_m_client_m_code" tableName="m_client">
<column defaultValueComputed="NULL" name="closure_reason_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="376">
<createIndex indexName="FK_m_client_m_image" tableName="m_client">
<column defaultValueComputed="NULL" name="image_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="377">
<createIndex indexName="FK_m_client_m_office" tableName="m_client">
<column defaultValueComputed="NULL" name="transfer_to_office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="378">
<createIndex indexName="FK_m_client_m_savings_account" tableName="m_client">
<column defaultValueComputed="NULL" name="default_savings_account"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="379">
<createIndex indexName="FK_m_client_m_savings_product" tableName="m_client">
<column defaultValueComputed="NULL" name="default_savings_product"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="380">
<createIndex indexName="FK_m_client_substatus_m_code_value" tableName="m_client">
<column defaultValueComputed="NULL" name="sub_status"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="381">
<createIndex indexName="FK_m_client_transaction_m_appuser" tableName="m_client_transaction">
<column name="appuser_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="382">
<createIndex indexName="FK_m_client_transaction_m_client" tableName="m_client_transaction">
<column name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="383">
<createIndex indexName="FK_m_client_transfer_details_m_appuser" tableName="m_client_transfer_details">
<column name="submitted_by"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="384">
<createIndex indexName="FK_m_client_transfer_details_m_client" tableName="m_client_transfer_details">
<column name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="385">
<createIndex indexName="FK_m_client_transfer_details_m_office" tableName="m_client_transfer_details">
<column name="from_office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="386">
<createIndex indexName="FK_m_client_transfer_details_m_office_2" tableName="m_client_transfer_details">
<column name="to_office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="387">
<createIndex indexName="FK_m_client_type_m_code_value" tableName="m_client">
<column defaultValueComputed="NULL" name="client_type_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="388">
<createIndex indexName="FK_m_client_type_m_code_value_withdraw" tableName="m_client">
<column defaultValueComputed="NULL" name="withdraw_reason_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="389">
<createIndex indexName="FK_m_client_type_mcode_value_reject" tableName="m_client">
<column defaultValueComputed="NULL" name="reject_reason_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="390">
<createIndex indexName="FK_m_code_value_id" tableName="acc_rule_tags">
<column name="tag_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="391">
<createIndex indexName="FK_m_family_members_client_id_m_client" tableName="m_family_members">
<column name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="392">
<createIndex indexName="FK_m_family_members_gender_m_code_value" tableName="m_family_members">
<column defaultValueComputed="NULL" name="gender_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="393">
<createIndex indexName="FK_m_family_members_marital_status_m_code_value" tableName="m_family_members">
<column defaultValueComputed="NULL" name="marital_status_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="394">
<createIndex indexName="FK_m_family_members_profession_m_code_value" tableName="m_family_members">
<column defaultValueComputed="NULL" name="profession_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="395">
<createIndex indexName="FK_m_family_members_relationship_m_code_value" tableName="m_family_members">
<column name="relationship_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="396">
<createIndex indexName="FK_m_group_level" tableName="m_group">
<column name="level_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="397">
<createIndex indexName="FK_m_group_m_code" tableName="m_group">
<column defaultValueComputed="NULL" name="closure_reason_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="398">
<createIndex indexName="FK_m_guarantor_fund_details_account_associations_id"
tableName="m_guarantor_funding_details">
<column name="account_associations_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="399">
<createIndex indexName="FK_m_guarantor_fund_details_m_guarantor" tableName="m_guarantor_funding_details">
<column name="guarantor_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="400">
<createIndex indexName="FK_m_guarantor_m_code_value" tableName="m_guarantor">
<column defaultValueComputed="NULL" name="client_reln_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="401">
<createIndex indexName="FK_m_guarantor_m_loan" tableName="m_guarantor">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="402">
<createIndex indexName="FK_m_import_m_appuser" tableName="m_import_document">
<column defaultValueComputed="NULL" name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="403">
<createIndex indexName="FK_m_interest_incentives_m_interest_rate_slab" tableName="m_interest_incentives">
<column name="interest_rate_slab_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="404">
<createIndex indexName="FK_m_loan_m_loan_recalculation_details" tableName="m_loan_recalculation_details">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="405">
<createIndex indexName="FK_m_loan_m_staff" tableName="m_loan">
<column defaultValueComputed="NULL" name="loan_officer_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="406">
<createIndex indexName="FK_m_loan_overdue_installment_charge_m_loan_charge"
tableName="m_loan_overdue_installment_charge">
<column name="loan_charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="407">
<createIndex indexName="FK_m_loan_overdue_installment_charge_m_loan_repayment_schedule"
tableName="m_loan_overdue_installment_charge">
<column name="loan_schedule_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="408">
<createIndex indexName="FK_m_loan_tranche_charges_m_charge" tableName="m_loan_tranche_charges">
<column name="charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="409">
<createIndex indexName="FK_m_loan_tranche_charges_m_loan" tableName="m_loan_tranche_charges">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="410">
<createIndex indexName="FK_m_loan_tranche_disbursement_charge_m_loan_charge"
tableName="m_loan_tranche_disbursement_charge">
<column name="loan_charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="411">
<createIndex indexName="FK_m_loan_tranche_disbursement_charge_m_loan_disbursement_detail"
tableName="m_loan_tranche_disbursement_charge">
<column defaultValueComputed="NULL" name="disbursement_detail_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="412">
<createIndex indexName="FK_m_loan_transaction_m_office" tableName="m_loan_transaction">
<column name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="413">
<createIndex indexName="FK_m_loan_transaction_m_payment_detail" tableName="m_loan_transaction">
<column defaultValueComputed="NULL" name="payment_detail_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="414">
<createIndex indexName="FK_m_loanpurpose_codevalue" tableName="m_loan">
<column defaultValueComputed="NULL" name="loanpurpose_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="415">
<createIndex indexName="FK_m_maker_m_appuser" tableName="m_portfolio_command_source">
<column name="maker_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="416">
<createIndex indexName="FK_m_meeting_m_client_attendance" tableName="m_client_attendance">
<column name="meeting_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="417">
<createIndex indexName="FK_m_note_m_group" tableName="m_note">
<column defaultValueComputed="NULL" name="group_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="418">
<createIndex indexName="FK_m_payment_detail_m_payment_type" tableName="m_payment_detail">
<column defaultValueComputed="NULL" name="payment_type_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="419">
<createIndex indexName="FK_m_payment_detail_m_payment_types" tableName="m_charge">
<column defaultValueComputed="NULL" name="payment_type_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="420">
<createIndex indexName="FK_m_product_loan_m_product_loan_recalculation_details"
tableName="m_product_loan_recalculation_details">
<column name="product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="421">
<createIndex indexName="FK_m_product_mix_product_id_to_m_product_loan" tableName="m_product_mix">
<column name="product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="422">
<createIndex indexName="FK_m_product_mix_restricted_product_id_to_m_product_loan" tableName="m_product_mix">
<column name="restricted_product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="423">
<createIndex indexName="FK_m_savings_account_transaction_m_office" tableName="m_savings_account_transaction">
<column name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="424">
<createIndex indexName="FK_m_savings_account_transaction_m_payment_detail"
tableName="m_savings_account_transaction">
<column defaultValueComputed="NULL" name="payment_detail_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="425">
<createIndex indexName="FK_m_savings_interest_incentives_m_savings_interest_rate_slab"
tableName="m_savings_interest_incentives">
<column name="deposit_account_interest_rate_slab_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="426">
<createIndex indexName="FK_m_share_account_dividend_details_account_id"
tableName="m_share_account_dividend_details">
<column name="account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="427">
<createIndex indexName="FK_m_share_account_dividend_details_dividend_pay_out_id"
tableName="m_share_account_dividend_details">
<column name="dividend_pay_out_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="428">
<createIndex indexName="FK_m_share_product_dividend_pay_out_createdby_id"
tableName="m_share_product_dividend_pay_out">
<column defaultValueComputed="NULL" name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="429">
<createIndex indexName="FK_m_share_product_dividend_pay_out_lastmodifiedby_id"
tableName="m_share_product_dividend_pay_out">
<column defaultValueComputed="NULL" name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="430">
<createIndex indexName="FK_m_share_product_dividend_pay_out_product_id"
tableName="m_share_product_dividend_pay_out">
<column name="product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="431">
<createIndex indexName="FK_m_staff_assignment_history_centre_id_m_group" tableName="m_staff_assignment_history">
<column defaultValueComputed="NULL" name="centre_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="432">
<createIndex indexName="FK_m_staff_assignment_history_m_staff" tableName="m_staff_assignment_history">
<column name="staff_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="433">
<createIndex indexName="FK_m_staff_m_image" tableName="m_staff">
<column defaultValueComputed="NULL" name="image_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="434">
<createIndex indexName="FK_m_staff_m_office" tableName="m_staff">
<column defaultValueComputed="NULL" name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="435">
<createIndex indexName="FK_m_standing_instructions_account_transfer_details"
tableName="m_account_transfer_standing_instructions">
<column name="account_transfer_details_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="436">
<createIndex indexName="FK_m_tellers_gl_account_credit_account_id" tableName="m_tellers">
<column defaultValueComputed="NULL" name="credit_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="437">
<createIndex indexName="FK_m_tellers_gl_account_debit_account_id" tableName="m_tellers">
<column defaultValueComputed="NULL" name="debit_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="438">
<createIndex indexName="FK_mappings_m_floating_rates" tableName="m_floating_rates_periods">
<column name="floating_rates_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="439">
<createIndex indexName="FK_mappings_m_floating_rates_id" tableName="m_product_loan_floating_rates">
<column name="floating_rates_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="440">
<createIndex indexName="FK_mappings_m_loan_repayment_schedule"
tableName="m_loan_transaction_repayment_schedule_mapping">
<column name="loan_repayment_schedule_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="441">
<createIndex indexName="FK_mappings_m_loan_transaction"
tableName="m_loan_transaction_repayment_schedule_mapping">
<column name="loan_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="442">
<createIndex indexName="FK_mappings_m_product_loan_id" tableName="m_product_loan_floating_rates">
<column name="loan_product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="443">
<createIndex indexName="FK_mappings_m_variable_product_loan_id"
tableName="m_product_loan_variable_installment_config">
<column name="loan_product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="444">
<createIndex indexName="FK_office_mapping_acc_gl_account" tableName="acc_gl_financial_activity_account">
<column defaultValueNumeric="0" name="gl_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="445">
<createIndex indexName="FK_rejectedon_userid" tableName="m_loan">
<column defaultValueComputed="NULL" name="rejectedon_userid"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="446">
<createIndex indexName="FK_savings_account_id" tableName="m_note">
<column defaultValueComputed="NULL" name="savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="447">
<createIndex indexName="FK_savings_account_tax_group" tableName="m_savings_account">
<column defaultValueComputed="NULL" name="tax_group_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="448">
<createIndex indexName="FK_savings_account_transaction_tax_details_savings_transaction"
tableName="m_savings_account_transaction_tax_details">
<column name="savings_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="449">
<createIndex indexName="FK_savings_account_transaction_tax_details_tax_component"
tableName="m_savings_account_transaction_tax_details">
<column name="tax_component_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="450">
<createIndex indexName="FK_savings_product_tax_group" tableName="m_savings_product">
<column defaultValueComputed="NULL" name="tax_group_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="451">
<createIndex indexName="FK_submittedon_userid" tableName="m_loan">
<column defaultValueComputed="NULL" name="submittedon_userid"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="452">
<createIndex indexName="FK_tax_component_createdby" tableName="m_tax_component">
<column name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="453">
<createIndex indexName="FK_tax_component_credit_gl_account" tableName="m_tax_component">
<column defaultValueComputed="NULL" name="credit_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="454">
<createIndex indexName="FK_tax_component_debit_gl_account" tableName="m_tax_component">
<column defaultValueComputed="NULL" name="debit_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="455">
<createIndex indexName="FK_tax_component_history_createdby" tableName="m_tax_component_history">
<column name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="456">
<createIndex indexName="FK_tax_component_history_lastmodifiedby" tableName="m_tax_component_history">
<column name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="457">
<createIndex indexName="FK_tax_component_history_tax_component_id" tableName="m_tax_component_history">
<column name="tax_component_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="458">
<createIndex indexName="FK_tax_component_lastmodifiedby" tableName="m_tax_component">
<column name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="459">
<createIndex indexName="FK_tax_group_createdby" tableName="m_tax_group">
<column name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="460">
<createIndex indexName="FK_tax_group_lastmodifiedby" tableName="m_tax_group">
<column name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="461">
<createIndex indexName="FK_tax_group_mappings_createdby" tableName="m_tax_group_mappings">
<column name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="462">
<createIndex indexName="FK_tax_group_mappings_lastmodifiedby" tableName="m_tax_group_mappings">
<column name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="463">
<createIndex indexName="FK_tax_group_mappings_tax_component" tableName="m_tax_group_mappings">
<column name="tax_component_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="464">
<createIndex indexName="FK_tax_group_mappings_tax_group" tableName="m_tax_group_mappings">
<column name="tax_group_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="465">
<createIndex indexName="FK_withdrawnon_userid" tableName="m_loan">
<column defaultValueComputed="NULL" name="withdrawnon_userid"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="466">
<createIndex indexName="FK_writeoffreason_m_loan_m_code_value" tableName="m_loan">
<column defaultValueComputed="NULL" name="writeoff_reason_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="467">
<createIndex indexName="FK_x_code_id" tableName="x_table_column_code_mappings">
<column name="code_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="468">
<createIndex indexName="IDX_OFFICE" tableName="m_entity_to_entity_access">
<column name="entity_type"/>
<column name="entity_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="469">
<createIndex indexName="IK_m_cashiers_m_staff" tableName="m_cashiers">
<column defaultValueComputed="NULL" name="staff_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="470">
<createIndex indexName="IK_m_cashiers_m_teller" tableName="m_cashiers">
<column defaultValueComputed="NULL" name="teller_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="471">
<createIndex indexName="IK_m_teller_transactions_m_cashier" tableName="m_cashier_transactions">
<column name="cashier_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="472">
<createIndex indexName="IK_m_tellers_m_office" tableName="m_tellers">
<column name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="473">
<createIndex indexName="Parent_Id_reference" tableName="m_group">
<column defaultValueComputed="NULL" name="parent_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="474">
<createIndex indexName="Parent_levelId_reference" tableName="m_group_level">
<column defaultValueComputed="NULL" name="parent_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="475">
<createIndex indexName="SEFKCLIENT00000001" tableName="scheduled_email_messages_outbound">
<column defaultValueComputed="NULL" name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="476">
<createIndex indexName="SEFKGROUP000000001" tableName="scheduled_email_messages_outbound">
<column defaultValueComputed="NULL" name="group_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="477">
<createIndex indexName="SEFKSTAFF000000001" tableName="scheduled_email_messages_outbound">
<column defaultValueComputed="NULL" name="staff_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="478">
<createIndex indexName="account_association_loan_fk" tableName="m_portfolio_account_associations">
<column defaultValueComputed="NULL" name="loan_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="479">
<createIndex indexName="account_association_savings_fk" tableName="m_portfolio_account_associations">
<column defaultValueComputed="NULL" name="savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="480">
<createIndex indexName="action_name" tableName="m_portfolio_command_source">
<column name="action_name"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="481">
<createIndex indexName="addressIdFk" tableName="m_client_address">
<column defaultValueNumeric="0" name="address_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="482">
<createIndex indexName="address_codefk" tableName="m_client_address">
<column defaultValueNumeric="0" name="address_type_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="483">
<createIndex indexName="address_fields_codefk1" tableName="m_address">
<column defaultValueComputed="NULL" name="state_province_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="484">
<createIndex indexName="address_fields_codefk2" tableName="m_address">
<column defaultValueComputed="NULL" name="country_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="485">
<createIndex indexName="approved_by_user_id" tableName="m_loan_reschedule_request">
<column defaultValueComputed="NULL" name="approved_by_user_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="486">
<createIndex indexName="borrower_cycle_loan_product_FK" tableName="m_product_loan_variations_borrower_cycle">
<column defaultValueNumeric="0" name="loan_product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="487">
<createIndex indexName="category_id" tableName="m_loanproduct_provisioning_entry">
<column name="category_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="488">
<createIndex indexName="fk_provisioning_criteria_definition_category" tableName="m_provisioning_criteria_definition">
<column name="category_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="489">
<createIndex indexName="cbConfigfk1" tableName="m_creditbureau_configuration">
<column defaultValueComputed="NULL" name="organisation_creditbureau_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="490">
<createIndex indexName="cbId" tableName="m_creditreport">
<column defaultValueComputed="NULL" name="creditBureauId"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="491">
<createIndex indexName="charge_id" tableName="m_loan_charge">
<column name="charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="492">
<createIndex indexName="fk_product_loan_charge_charge" tableName="m_product_loan_charge">
<column name="charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="493">
<createIndex indexName="fk_savings_account_charge_charge" tableName="m_savings_account_charge">
<column name="charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="494">
<createIndex indexName="fk_savings_product_charge_charge" tableName="m_savings_product_charge">
<column name="charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="495">
<createIndex indexName="fk_share_account_charge_charge" tableName="m_share_account_charge">
<column name="charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="496">
<createIndex indexName="checked_on_date" tableName="m_portfolio_command_source">
<column defaultValueComputed="NULL" name="checked_on_date"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="497">
<createIndex indexName="client_id" tableName="m_group_client">
<column name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="498">
<createIndex indexName="fk_survey_scorecards_client" tableName="m_survey_scorecards">
<column name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="499">
<createIndex indexName="client_staff_id" tableName="m_client">
<column defaultValueComputed="NULL" name="staff_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="500">
<createIndex indexName="clientaddressfk" tableName="m_client_address">
<column defaultValueNumeric="0" name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="501">
<createIndex indexName="createdby_id" tableName="m_adhoc">
<column name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="502">
<createIndex indexName="fk_provisioning_criteria_createdby" tableName="m_provisioning_criteria">
<column defaultValueComputed="NULL" name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="503">
<createIndex indexName="fk_provisioning_history_createdby" tableName="m_provisioning_history">
<column defaultValueComputed="NULL" name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="504">
<createIndex indexName="fk_report_mailing_job_createdby" tableName="m_report_mailing_job">
<column name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="505">
<createIndex indexName="fk_loanproduct_provisioning_entry_criteria" tableName="m_loanproduct_provisioning_entry">
<column name="criteria_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="506">
<createIndex indexName="fk_loanproduct_provisioning_mapping_criteria" tableName="m_loanproduct_provisioning_mapping">
<column name="criteria_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="507">
<createIndex indexName="fk_loanproduct_criteria_definition_criteria" tableName="m_provisioning_criteria_definition">
<column name="criteria_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="508">
<createIndex indexName="entity_name" tableName="m_portfolio_command_source">
<column name="entity_name"/>
<column defaultValueComputed="NULL" name="resource_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="509">
<createIndex indexName="expense_account" tableName="m_loanproduct_provisioning_entry">
<column defaultValueComputed="NULL" name="expense_account"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="510">
<createIndex indexName="fk_provisioning_criteria_definition_expense_account" tableName="m_provisioning_criteria_definition">
<column defaultValueComputed="NULL" name="expense_account"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="511">
<createIndex indexName="fkClient" tableName="m_client_collateral_management">
<column defaultValueComputed="NULL" name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="512">
<createIndex indexName="fkClientCollateral" tableName="m_loan_collateral_management">
<column defaultValueComputed="NULL" name="client_collateral_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="513">
<createIndex indexName="fkCollateral" tableName="m_client_collateral_management">
<column defaultValueComputed="NULL" name="collateral_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="514">
<createIndex indexName="fkCurrencyCode" tableName="m_collateral_management">
<column defaultValueComputed="NULL" name="currency"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="515">
<createIndex indexName="fkLoan" tableName="m_loan_collateral_management">
<column defaultValueComputed="NULL" name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="516">
<createIndex indexName="fkTransaction" tableName="m_loan_collateral_management">
<column defaultValueComputed="NULL" name="transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="517">
<createIndex indexName="fk_cb_lp2" tableName="m_creditbureau_loanproduct_mapping">
<column name="loan_product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="518">
<createIndex indexName="fk_hook_configuration_hook" tableName="m_hook_configuration">
<column defaultValueComputed="NULL" name="hook_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="519">
<createIndex indexName="fk_hook_id_idx" tableName="m_hook_registered_events">
<column name="hook_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="520">
<createIndex indexName="fk_hook_template_id_idx" tableName="m_hook_schema">
<column name="hook_template_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="521">
<createIndex indexName="fk_interop_identifier_account" tableName="interop_identifier">
<column name="account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="522">
<createIndex indexName="fk_m_appuser_002x" tableName="m_appuser">
<column defaultValueComputed="NULL" name="staff_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="523">
<createIndex indexName="fk_m_group_client_001_idx" tableName="m_loan">
<column defaultValueComputed="NULL" name="group_id"/>
<column defaultValueComputed="NULL" name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="524">
<createIndex indexName="fk_m_loan_officer_assignment_history_0001"
tableName="m_loan_officer_assignment_history">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="525">
<createIndex indexName="fk_m_loan_officer_assignment_history_0002"
tableName="m_loan_officer_assignment_history">
<column defaultValueComputed="NULL" name="loan_officer_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="526">
<createIndex indexName="fk_m_product_loan_configurable_attributes_0001"
tableName="m_product_loan_configurable_attributes">
<column name="loan_product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="527">
<createIndex indexName="fk_m_savings_officer_assignment_history_0001"
tableName="m_savings_officer_assignment_history">
<column name="account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="528">
<createIndex indexName="fk_m_savings_officer_assignment_history_0002"
tableName="m_savings_officer_assignment_history">
<column defaultValueComputed="NULL" name="savings_officer_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="529">
<createIndex indexName="fk_report_parameter_001_idx" tableName="stretchy_report_parameter">
<column name="report_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="530">
<createIndex indexName="fk_report_parameter_002_idx" tableName="stretchy_report_parameter">
<column name="parameter_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="531">
<createIndex indexName="fk_schedule_email_campign1" tableName="scheduled_email_messages_outbound">
<column defaultValueComputed="NULL" name="email_campaign_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="532">
<createIndex indexName="fk_stretchy_parameter_001_idx" tableName="stretchy_parameter">
<column defaultValueComputed="NULL" name="parent_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="533">
<createIndex indexName="fk_template_id_idx" tableName="m_hook">
<column name="template_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="534">
<createIndex indexName="fk_topic_has_m_appuser_m_appuser1" tableName="topic_subscriber">
<column name="user_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="535">
<createIndex indexName="fk_topic_has_m_appuser_topic" tableName="topic_subscriber">
<column name="topic_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="536">
<createIndex indexName="fk_ugd_template_id" tableName="m_hook">
<column defaultValueComputed="NULL" name="ugd_template_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="537">
<createIndex indexName="fkloanrepayment" tableName="m_repayment_with_post_dated_checks">
<column defaultValueComputed="NULL" name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="538">
<createIndex indexName="fkrepaymentwithpostdated" tableName="m_repayment_with_post_dated_checks">
<column defaultValueComputed="NULL" name="repayment_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="539">
<createIndex indexName="group_id" tableName="m_loan">
<column defaultValueComputed="NULL" name="group_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="540">
<createIndex indexName="history_id" tableName="m_loanproduct_provisioning_entry">
<column name="history_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="541">
<createIndex indexName="import_document_id" tableName="m_import_document">
<column name="document_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="542">
<createIndex indexName="job_id" tableName="m_report_mailing_job_run_history">
<column name="job_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="543">
<createIndex indexName="last_time_password_updated" tableName="m_appuser">
<column defaultValueDate="1970-01-01" name="last_time_password_updated"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="544">
<createIndex indexName="lastmodifiedby_id" tableName="m_adhoc">
<column name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="545">
<createIndex indexName="provisioning_criteria_lastmodifiedby_id" tableName="m_provisioning_criteria">
<column defaultValueComputed="NULL" name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="546">
<createIndex indexName="provisioning_history_lastmodifiedby_id" tableName="m_provisioning_history">
<column defaultValueComputed="NULL" name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="547">
<createIndex indexName="report_mailing_job_lastmodifiedby_id" tableName="m_report_mailing_job">
<column defaultValueComputed="NULL" name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="548">
<createIndex indexName="loanproduct_provisioning_entry_liability_account" tableName="m_loanproduct_provisioning_entry">
<column defaultValueComputed="NULL" name="liability_account"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="549">
<createIndex indexName="provisioning_criteria_definition_liability_account" tableName="m_provisioning_criteria_definition">
<column defaultValueComputed="NULL" name="liability_account"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="550">
<createIndex indexName="linked_loan_fk" tableName="m_portfolio_account_associations">
<column defaultValueComputed="NULL" name="linked_loan_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="551">
<createIndex indexName="linked_savings_fk" tableName="m_portfolio_account_associations">
<column defaultValueComputed="NULL" name="linked_savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="552">
<createIndex indexName="loan_id" tableName="m_loan_repayment_schedule_history">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="553">
<createIndex indexName="loan_reschedule_request_loan_id" tableName="m_loan_reschedule_request">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="554">
<createIndex indexName="loan_reschedule_request_id" tableName="m_loan_repayment_schedule_history">
<column defaultValueComputed="NULL" name="loan_reschedule_request_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="555">
<createIndex indexName="m_holiday_id_ibfk_1" tableName="m_holiday_office">
<column name="holiday_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="556">
<createIndex indexName="m_loan_charge_ibfk_2" tableName="m_loan_charge">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="557">
<createIndex indexName="m_loan_topup_FK_account_transfer_details_id" tableName="m_loan_topup">
<column defaultValueComputed="NULL" name="account_transfer_details_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="558">
<createIndex indexName="m_loan_topup_FK_closure_loan_id" tableName="m_loan_topup">
<column name="closure_loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="559">
<createIndex indexName="m_loan_topup_FK_loan_id" tableName="m_loan_topup">
<column name="loan_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="560">
<createIndex indexName="m_office_id_ibfk_2" tableName="m_holiday_office">
<column name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="561">
<createIndex indexName="m_savings_account_charge_ibfk_2" tableName="m_savings_account_charge">
<column name="savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="562">
<createIndex indexName="m_share_account_charge_ibfk_2" tableName="m_share_account_charge">
<column name="account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="563">
<createIndex indexName="m_share_account_ibfk_1" tableName="m_share_account">
<column name="product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="564">
<createIndex indexName="m_share_account_ibfk_2" tableName="m_share_account">
<column name="savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="565">
<createIndex indexName="m_share_account_ibfk_3" tableName="m_share_account">
<column defaultValueComputed="NULL" name="submitted_userid"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="566">
<createIndex indexName="m_share_account_ibfk_4" tableName="m_share_account">
<column defaultValueComputed="NULL" name="approved_userid"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="567">
<createIndex indexName="m_share_account_ibfk_5" tableName="m_share_account">
<column defaultValueComputed="NULL" name="rejected_userid"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="568">
<createIndex indexName="m_share_account_ibfk_6" tableName="m_share_account">
<column defaultValueComputed="NULL" name="activated_userid"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="569">
<createIndex indexName="m_share_account_ibfk_7" tableName="m_share_account">
<column defaultValueComputed="NULL" name="closed_userid"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="570">
<createIndex indexName="m_share_account_ibfk_8" tableName="m_share_account">
<column defaultValueComputed="NULL" name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="571">
<createIndex indexName="m_share_account_ibfk_9" tableName="m_share_account">
<column name="client_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="572">
<createIndex indexName="m_share_account_purchased_shares_ibfk_1" tableName="m_share_account_transactions">
<column name="account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="573">
<createIndex indexName="m_share_account_transactions_charge_mapping_ibfk1"
tableName="m_share_account_charge_paid_by">
<column defaultValueComputed="NULL" name="share_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="574">
<createIndex indexName="m_share_account_transactions_charge_mapping_ibfk2"
tableName="m_share_account_charge_paid_by">
<column defaultValueComputed="NULL" name="charge_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="575">
<createIndex indexName="m_share_product_charge_ibfk_1" tableName="m_share_product_charge">
<column name="charge_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="576">
<createIndex indexName="m_share_product_ibfk_1" tableName="m_share_product">
<column defaultValueComputed="NULL" name="createdby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="577">
<createIndex indexName="m_share_product_ibfk_2" tableName="m_share_product">
<column defaultValueComputed="NULL" name="lastmodifiedby_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="578">
<createIndex indexName="m_share_product_market_price_ibfk_1" tableName="m_share_product_market_price">
<column name="product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="579">
<createIndex indexName="m_template_id" tableName="m_template_m_templatemappers">
<column name="m_template_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="580">
<createIndex indexName="made_on_date" tableName="m_portfolio_command_source">
<column name="made_on_date"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="581">
<createIndex indexName="notification_id" tableName="notification_mapper">
<column defaultValueComputed="NULL" name="notification_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="582">
<createIndex indexName="notification_mapper_user" tableName="notification_mapper">
<column defaultValueComputed="NULL" name="user_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="583">
<createIndex indexName="group_office_id" tableName="m_group">
<column name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="584">
<createIndex indexName="loanproduct_provisioning_entry_office_id" tableName="m_loanproduct_provisioning_entry">
<column name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="585">
<createIndex indexName="portfolio_command_source_office_id" tableName="m_portfolio_command_source">
<column defaultValueComputed="NULL" name="office_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="586">
<createIndex indexName="orgcb_cbfk" tableName="m_organisation_creditbureau">
<column name="creditbureau_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="587">
<createIndex indexName="processing_result_enum" tableName="m_portfolio_command_source">
<column name="processing_result_enum"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="588">
<createIndex indexName="product_id" tableName="m_entity_datatable_check">
<column defaultValueComputed="NULL" name="product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="589">
<createIndex indexName="loanproduct_provisioning_entry_product_id" tableName="m_loanproduct_provisioning_entry">
<column name="product_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="590">
<createIndex indexName="survey_responses_question_id" tableName="m_survey_responses">
<column name="question_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="591">
<createIndex indexName="survey_scorecards_question_id" tableName="m_survey_scorecards">
<column name="question_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="592">
<createIndex indexName="rejected_by_user_id" tableName="m_loan_reschedule_request">
<column defaultValueComputed="NULL" name="rejected_by_user_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="593">
<createIndex indexName="report_id" tableName="sms_campaign">
<column name="report_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="594">
<createIndex indexName="reschedule_reason_cv_id" tableName="m_loan_reschedule_request">
<column defaultValueComputed="NULL" name="reschedule_reason_cv_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="595">
<createIndex indexName="response_id" tableName="m_survey_scorecards">
<column name="response_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="596">
<createIndex indexName="run_as_userid" tableName="m_report_mailing_job">
<column name="run_as_userid"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="597">
<createIndex indexName="savings_account_transaction_id" tableName="m_note">
<column defaultValueComputed="NULL" name="savings_account_transaction_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="598">
<createIndex indexName="scheduled_email_campaign_ibfk_1" tableName="scheduled_email_campaign">
<column defaultValueComputed="NULL" name="stretchy_report_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="599">
<createIndex indexName="scheduledjobsFK" tableName="job_run_history">
<column name="job_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="601">
<createIndex indexName="staff_id" tableName="m_group">
<column defaultValueComputed="NULL" name="staff_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="602">
<createIndex indexName="stretchy_report_id" tableName="m_report_mailing_job">
<column name="stretchy_report_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="603">
<createIndex indexName="submitted_by_user_id" tableName="m_loan_reschedule_request">
<column name="submitted_by_user_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="604">
<createIndex indexName="survey_id" tableName="m_survey_components">
<column name="survey_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="605">
<createIndex indexName="survey_lookup_tables_survey_id" tableName="m_survey_lookup_tables">
<column name="survey_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="606">
<createIndex indexName="survey_questions_survey_id" tableName="m_survey_questions">
<column name="survey_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="607">
<createIndex indexName="survey_scorecards_survey_id" tableName="m_survey_scorecards">
<column name="survey_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="608">
<createIndex indexName="token" tableName="twofactor_access_token">
<column name="token"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="609">
<createIndex indexName="transaction_date_index" tableName="acc_gl_journal_entry">
<column defaultValueComputed="NULL" name="transaction_date"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="610">
<createIndex indexName="transfer_to_savings_account_id" tableName="m_deposit_account_term_and_preclosure">
<column defaultValueComputed="NULL" name="transfer_to_savings_account_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="611">
<createIndex indexName="user" tableName="twofactor_access_token">
<column name="appuser_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="612">
<createIndex indexName="user_id" tableName="m_appuser_previous_password">
<column name="user_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="613">
<createIndex indexName="survey_scorecards_user_id" tableName="m_survey_scorecards">
<column name="user_id"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="614">
<createIndex indexName="x_registered_table_name" tableName="m_entity_datatable_check">
<column name="x_registered_table_name"/>
</createIndex>
</changeSet>
<changeSet author="fineract" id="615">
<addForeignKeyConstraint baseColumnNames="from_office_id" baseTableName="m_office_transaction"
constraintName="FK1E37728B783C5C25" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="616">
<addForeignKeyConstraint baseColumnNames="to_office_id" baseTableName="m_office_transaction"
constraintName="FK1E37728B93C6C1B6" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="617">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="client_device_registration"
constraintName="FK1_client_device_registration_m_client" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="618">
<addForeignKeyConstraint baseColumnNames="gender_cv_id" baseTableName="m_client"
constraintName="FK1_m_client_gender_m_code_value" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="619">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="request_audit_table"
constraintName="FK1_request_audit_table_m_client" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="620">
<addForeignKeyConstraint baseColumnNames="parent_id" baseTableName="m_office"
constraintName="FK2291C477E2551DCC" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="621">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_repayment_schedule"
constraintName="FK488B92AA40BE0710" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="622">
<addForeignKeyConstraint baseColumnNames="role_id" baseTableName="m_appuser_role"
constraintName="FK7662CE5915CEC7AB" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_role" validate="true"/>
</changeSet>
<changeSet author="fineract" id="623">
<addForeignKeyConstraint baseColumnNames="appuser_id" baseTableName="m_appuser_role"
constraintName="FK7662CE59B4100309" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="624">
<addForeignKeyConstraint baseColumnNames="fund_id" baseTableName="m_loan" constraintName="FK7C885877240145"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_fund" validate="true"/>
</changeSet>
<changeSet author="fineract" id="625">
<addForeignKeyConstraint baseColumnNames="loan_transaction_id" baseTableName="m_note"
constraintName="FK7C9708924D26803" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_loan_transaction" validate="true"/>
</changeSet>
<changeSet author="fineract" id="626">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_note" constraintName="FK7C9708940BE0710"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="627">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_note"
constraintName="FK7C97089541F0A56" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="628">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_note" constraintName="FK7C970897179A0CB"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="629">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="m_note"
constraintName="FK7C970898F889C3F" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="630">
<addForeignKeyConstraint baseColumnNames="permission_id" baseTableName="m_role_permission"
constraintName="FK8DEDB048103B544B" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_permission" validate="true"/>
</changeSet>
<changeSet author="fineract" id="631">
<addForeignKeyConstraint baseColumnNames="role_id" baseTableName="m_role_permission"
constraintName="FK8DEDB04815CEC7AB" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_role" validate="true"/>
</changeSet>
<changeSet author="fineract" id="632">
<addForeignKeyConstraint baseColumnNames="fund_id" baseTableName="m_product_loan"
constraintName="FKA6A8A7D77240145" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_fund" validate="true"/>
</changeSet>
<changeSet author="fineract" id="633">
<addForeignKeyConstraint baseColumnNames="office_id" baseTableName="m_appuser"
constraintName="FKB3D587CE0DD567A" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="634">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_loan" constraintName="FKB6F935D87179A0CB"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="635">
<addForeignKeyConstraint baseColumnNames="product_id" baseTableName="m_loan" constraintName="FKB6F935D8C8D4B434"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="636">
<addForeignKeyConstraint baseColumnNames="campaign_id" baseTableName="sms_messages_outbound"
constraintName="FKCAMPAIGN00000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="sms_campaign" validate="true"/>
</changeSet>
<changeSet author="fineract" id="637">
<addForeignKeyConstraint baseColumnNames="office_id" baseTableName="m_client"
constraintName="FKCE00CAB3E0DD567A" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="638">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_transaction"
constraintName="FKCFCEA42640BE0710" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="639">
<addForeignKeyConstraint baseColumnNames="code_id" baseTableName="m_code_value"
constraintName="FKCFCEA42640BE071Z" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_code" validate="true"/>
</changeSet>
<changeSet author="fineract" id="640">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="sms_messages_outbound"
constraintName="FKCLIENT00000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="641">
<addForeignKeyConstraint baseColumnNames="savings_account_id" baseTableName="m_deposit_account_recurring_detail"
constraintName="FKDARD00000000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="642">
<addForeignKeyConstraint baseColumnNames="savings_account_id"
baseTableName="m_deposit_account_term_and_preclosure"
constraintName="FKDATP00000000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="643">
<addForeignKeyConstraint baseColumnNames="deposit_product_id"
baseTableName="m_deposit_product_interest_rate_chart"
constraintName="FKDPIRC00000000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_savings_product" validate="true"/>
</changeSet>
<changeSet author="fineract" id="644">
<addForeignKeyConstraint baseColumnNames="interest_rate_chart_id"
baseTableName="m_deposit_product_interest_rate_chart"
constraintName="FKDPIRC00000000000002" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_interest_rate_chart" validate="true"/>
</changeSet>
<changeSet author="fineract" id="645">
<addForeignKeyConstraint baseColumnNames="savings_product_id" baseTableName="m_deposit_product_recurring_detail"
constraintName="FKDPRD00000000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_savings_product" validate="true"/>
</changeSet>
<changeSet author="fineract" id="646">
<addForeignKeyConstraint baseColumnNames="savings_product_id"
baseTableName="m_deposit_product_term_and_preclosure"
constraintName="FKDPTP00000000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_savings_product" validate="true"/>
</changeSet>
<changeSet author="fineract" id="647">
<addForeignKeyConstraint baseColumnNames="tag_id" baseTableName="acc_gl_account"
constraintName="FKGLACC000000002" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="648">
<addForeignKeyConstraint baseColumnNames="group_id" baseTableName="sms_messages_outbound"
constraintName="FKGROUP000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="649">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_group_roles"
constraintName="FKGroupRoleClientId" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="650">
<addForeignKeyConstraint baseColumnNames="group_id" baseTableName="m_group_roles"
constraintName="FKGroupRoleGroupId" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="651">
<addForeignKeyConstraint baseColumnNames="interest_rate_chart_id" baseTableName="m_interest_rate_slab"
constraintName="FKIRS00000000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_interest_rate_chart" validate="true"/>
</changeSet>
<changeSet author="fineract" id="652">
<addForeignKeyConstraint baseColumnNames="savings_account_id" baseTableName="m_mandatory_savings_schedule"
constraintName="FKMSS0000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="653">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_savings_account"
constraintName="FKSA00000000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="654">
<addForeignKeyConstraint baseColumnNames="group_id" baseTableName="m_savings_account"
constraintName="FKSA00000000000002" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="655">
<addForeignKeyConstraint baseColumnNames="product_id" baseTableName="m_savings_account"
constraintName="FKSA00000000000003" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_savings_product" validate="true"/>
</changeSet>
<changeSet author="fineract" id="656">
<addForeignKeyConstraint baseColumnNames="savings_account_id"
baseTableName="m_savings_account_interest_rate_chart"
constraintName="FKSAIRC00000000000001" deferrable="false" initiallyDeferred="false"
onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="id"
referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="657">
<addForeignKeyConstraint baseColumnNames="savings_account_interest_rate_chart_id"
baseTableName="m_savings_account_interest_rate_slab"
constraintName="FKSAIRS00000000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_savings_account_interest_rate_chart" validate="true"/>
</changeSet>
<changeSet author="fineract" id="658">
<addForeignKeyConstraint baseColumnNames="savings_account_id" baseTableName="m_savings_account_transaction"
constraintName="FKSAT0000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="659">
<addForeignKeyConstraint baseColumnNames="staff_id" baseTableName="sms_messages_outbound"
constraintName="FKSTAFF000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_staff" validate="true"/>
</changeSet>
<changeSet author="fineract" id="660">
<addForeignKeyConstraint baseColumnNames="parent_id" baseTableName="acc_gl_account"
constraintName="FK_ACC_0000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="661">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_rate"
constraintName="FK_M_LOAN_RATE_LOAN" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="662">
<addForeignKeyConstraint baseColumnNames="rate_id" baseTableName="m_loan_rate"
constraintName="FK_M_LOAN_RATE_RATE" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_rate" validate="true"/>
</changeSet>
<changeSet author="fineract" id="663">
<addForeignKeyConstraint baseColumnNames="product_loan_id" baseTableName="m_product_loan_rate"
constraintName="FK_M_PRODUCT_LOAN_RATE_LOAN" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="664">
<addForeignKeyConstraint baseColumnNames="rate_id" baseTableName="m_product_loan_rate"
constraintName="FK_M_PRODUCT_LOAN_RATE_RATE" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_rate" validate="true"/>
</changeSet>
<changeSet author="fineract" id="665">
<addForeignKeyConstraint baseColumnNames="approve_user" baseTableName="m_rate"
constraintName="FK_M_RATE_APPROVE_USER" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="666">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_rate"
constraintName="FK_M_RATE_CREATE_USER" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="667">
<addForeignKeyConstraint baseColumnNames="app_user_id" baseTableName="m_pocket"
constraintName="FK__m_appuser__pocket" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="668">
<addForeignKeyConstraint baseColumnNames="loan_charge_id" baseTableName="m_loan_charge_paid_by"
constraintName="FK__m_loan_charge" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_loan_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="669">
<addForeignKeyConstraint baseColumnNames="loan_reschedule_request_id"
baseTableName="m_loan_reschedule_request_term_variations_mapping"
constraintName="FK__m_loan_reschedule_request" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_reschedule_request"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="670">
<addForeignKeyConstraint baseColumnNames="loan_term_variations_id"
baseTableName="m_loan_reschedule_request_term_variations_mapping"
constraintName="FK__m_loan_term_variations" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_term_variations"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="671">
<addForeignKeyConstraint baseColumnNames="loan_transaction_id" baseTableName="m_loan_charge_paid_by"
constraintName="FK__m_loan_transaction" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_loan_transaction" validate="true"/>
</changeSet>
<changeSet author="fineract" id="672">
<addForeignKeyConstraint baseColumnNames="pocket_id" baseTableName="m_pocket_accounts_mapping"
constraintName="FK__m_pocket" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_pocket" validate="true"/>
</changeSet>
<changeSet author="fineract" id="673">
<addForeignKeyConstraint baseColumnNames="savings_account_charge_id"
baseTableName="m_savings_account_charge_paid_by"
constraintName="FK__m_savings_account_charge" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account_charge"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="674">
<addForeignKeyConstraint baseColumnNames="savings_account_transaction_id"
baseTableName="m_savings_account_charge_paid_by"
constraintName="FK__m_savings_account_transaction" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account_transaction"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="675">
<addForeignKeyConstraint baseColumnNames="rel_id" baseTableName="m_entity_to_entity_mapping"
constraintName="FK__rel_id_m_entity_relation_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_entity_relation" validate="true"/>
</changeSet>
<changeSet author="fineract" id="676">
<addForeignKeyConstraint baseColumnNames="credit_account_id" baseTableName="acc_accounting_rule"
constraintName="FK_acc_accounting_rule_acc_gl_account_credit" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="677">
<addForeignKeyConstraint baseColumnNames="debit_account_id" baseTableName="acc_accounting_rule"
constraintName="FK_acc_accounting_rule_acc_gl_account_debit" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="678">
<addForeignKeyConstraint baseColumnNames="acc_rule_id" baseTableName="acc_rule_tags"
constraintName="FK_acc_accounting_rule_id" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="acc_accounting_rule" validate="true"/>
</changeSet>
<changeSet author="fineract" id="679">
<addForeignKeyConstraint baseColumnNames="office_id" baseTableName="acc_accounting_rule"
constraintName="FK_acc_accounting_rule_m_office" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="680">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="acc_gl_closure"
constraintName="FK_acc_gl_closure_m_appuser" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="681">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="acc_gl_closure"
constraintName="FK_acc_gl_closure_m_appuser_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="682">
<addForeignKeyConstraint baseColumnNames="office_id" baseTableName="acc_gl_closure"
constraintName="FK_acc_gl_closure_m_office" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="683">
<addForeignKeyConstraint baseColumnNames="account_id" baseTableName="acc_gl_journal_entry"
constraintName="FK_acc_gl_journal_entry_acc_gl_account" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="684">
<addForeignKeyConstraint baseColumnNames="reversal_id" baseTableName="acc_gl_journal_entry"
constraintName="FK_acc_gl_journal_entry_acc_gl_journal_entry" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_journal_entry" validate="true"/>
</changeSet>
<changeSet author="fineract" id="685">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="acc_gl_journal_entry"
constraintName="FK_acc_gl_journal_entry_m_appuser" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="686">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="acc_gl_journal_entry"
constraintName="FK_acc_gl_journal_entry_m_appuser_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="687">
<addForeignKeyConstraint baseColumnNames="client_transaction_id" baseTableName="acc_gl_journal_entry"
constraintName="FK_acc_gl_journal_entry_m_client_transaction" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client_transaction" validate="true"/>
</changeSet>
<changeSet author="fineract" id="688">
<addForeignKeyConstraint baseColumnNames="loan_transaction_id" baseTableName="acc_gl_journal_entry"
constraintName="FK_acc_gl_journal_entry_m_loan_transaction" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_transaction" validate="true"/>
</changeSet>
<changeSet author="fineract" id="689">
<addForeignKeyConstraint baseColumnNames="office_id" baseTableName="acc_gl_journal_entry"
constraintName="FK_acc_gl_journal_entry_m_office" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="690">
<addForeignKeyConstraint baseColumnNames="payment_details_id" baseTableName="acc_gl_journal_entry"
constraintName="FK_acc_gl_journal_entry_m_payment_detail" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_payment_detail" validate="true"/>
</changeSet>
<changeSet author="fineract" id="691">
<addForeignKeyConstraint baseColumnNames="savings_transaction_id" baseTableName="acc_gl_journal_entry"
constraintName="FK_acc_gl_journal_entry_m_savings_account_transaction"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account_transaction"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="692">
<addForeignKeyConstraint baseColumnNames="share_transaction_id" baseTableName="acc_gl_journal_entry"
constraintName="FK_acc_gl_journal_entry_m_share_account_transaction" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_share_account_transactions"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="693">
<addForeignKeyConstraint baseColumnNames="charge_id" baseTableName="acc_product_mapping"
constraintName="FK_acc_product_mapping_m_charge" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="694">
<addForeignKeyConstraint baseColumnNames="payment_type" baseTableName="acc_product_mapping"
constraintName="FK_acc_product_mapping_m_payment_type" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_payment_type" validate="true"/>
</changeSet>
<changeSet author="fineract" id="695">
<addForeignKeyConstraint baseColumnNames="access_type_code_value_id" baseTableName="m_entity_to_entity_access"
constraintName="FK_access_type_code_m_code_value" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="696">
<addForeignKeyConstraint baseColumnNames="loan_repayment_schedule_id"
baseTableName="m_loan_interest_recalculation_additional_details"
constraintName="FK_additional_details_repayment_schedule_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_repayment_schedule"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="697">
<addForeignKeyConstraint baseColumnNames="approvedon_userid" baseTableName="m_loan"
constraintName="FK_approvedon_userid" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="698">
<addForeignKeyConstraint baseColumnNames="external_service_id" baseTableName="c_external_service_properties"
constraintName="FK_c_external_service_properties_c_external_service" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="c_external_service" validate="true"/>
</changeSet>
<changeSet author="fineract" id="699">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_client_non_person"
constraintName="FK_client_id" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="700">
<addForeignKeyConstraint baseColumnNames="closedon_userid" baseTableName="m_loan"
constraintName="FK_closedon_userid" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="701">
<addForeignKeyConstraint baseColumnNames="type_cv_id" baseTableName="m_loan_collateral"
constraintName="FK_collateral_code_value" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="702">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_collateral"
constraintName="FK_collateral_m_loan" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="703">
<addForeignKeyConstraint baseColumnNames="savings_account_id"
baseTableName="m_deposit_account_on_hold_transaction"
constraintName="FK_deposit_on_hold_transaction_m_savings_account" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="704">
<addForeignKeyConstraint baseColumnNames="disbursedon_userid" baseTableName="m_loan"
constraintName="FK_disbursedon_userid" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="705">
<addForeignKeyConstraint baseColumnNames="glim_id" baseTableName="m_loan" constraintName="FK_glim_id"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="glim_accounts" validate="true"/>
</changeSet>
<changeSet author="fineract" id="706">
<addForeignKeyConstraint baseColumnNames="group_id" baseTableName="glim_accounts" constraintName="FK_group_id"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="707">
<addForeignKeyConstraint baseColumnNames="role_cv_id" baseTableName="m_group_roles"
constraintName="FK_grouprole_m_codevalue" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="708">
<addForeignKeyConstraint baseColumnNames="group_id" baseTableName="gsim_accounts"
constraintName="FK_gsim_group_id" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="709">
<addForeignKeyConstraint baseColumnNames="gsim_id" baseTableName="m_savings_account" constraintName="FK_gsim_id"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="gsim_accounts" validate="true"/>
</changeSet>
<changeSet author="fineract" id="710">
<addForeignKeyConstraint baseColumnNames="loan_product_id" baseTableName="m_product_loan_guarantee_details"
constraintName="FK_guarantee_details_loan_product" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="711">
<addForeignKeyConstraint baseColumnNames="guarantor_fund_detail_id" baseTableName="m_guarantor_transaction"
constraintName="FK_guarantor_transaction_guarantor_fund_detail" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_guarantor_funding_details"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="712">
<addForeignKeyConstraint baseColumnNames="deposit_on_hold_transaction_id"
baseTableName="m_guarantor_transaction"
constraintName="FK_guarantor_transaction_m_deposit_account_on_hold_transaction"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_deposit_account_on_hold_transaction"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="713">
<addForeignKeyConstraint baseColumnNames="loan_transaction_id" baseTableName="m_guarantor_transaction"
constraintName="FK_guarantor_transaction_m_loan_transaction" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_transaction" validate="true"/>
</changeSet>
<changeSet author="fineract" id="714">
<addForeignKeyConstraint baseColumnNames="job_id" baseTableName="job_parameters" constraintName="FK_job_id"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="job" validate="true"/>
</changeSet>
<changeSet author="fineract" id="715">
<addForeignKeyConstraint baseColumnNames="loan_charge_id" baseTableName="m_loan_installment_charge"
constraintName="FK_loan_charge_id_charge_schedule" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="716">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_disbursement_detail"
constraintName="FK_loan_disbursement_detail_loan_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="717">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_term_variations"
constraintName="FK_loan_id_m_loan_id" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="718">
<addForeignKeyConstraint baseColumnNames="loan_transaction_strategy_id" baseTableName="m_loan"
constraintName="FK_loan_ltp_strategy" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="ref_loan_transaction_processing_strategy" validate="true"/>
</changeSet>
<changeSet author="fineract" id="719">
<addForeignKeyConstraint baseColumnNames="loan_schedule_id" baseTableName="m_loan_installment_charge"
constraintName="FK_loan_schedule_id_charge_schedule" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_repayment_schedule"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="720">
<addForeignKeyConstraint baseColumnNames="loan_transaction_strategy_id" baseTableName="m_product_loan"
constraintName="FK_ltp_strategy" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="ref_loan_transaction_processing_strategy" validate="true"/>
</changeSet>
<changeSet author="fineract" id="721">
<addForeignKeyConstraint baseColumnNames="from_client_id" baseTableName="m_account_transfer_details"
constraintName="FK_m_account_transfer_details_from_client" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="722">
<addForeignKeyConstraint baseColumnNames="from_loan_account_id" baseTableName="m_account_transfer_details"
constraintName="FK_m_account_transfer_details_from_loan_account" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="723">
<addForeignKeyConstraint baseColumnNames="from_office_id" baseTableName="m_account_transfer_details"
constraintName="FK_m_account_transfer_details_from_office" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="724">
<addForeignKeyConstraint baseColumnNames="from_savings_account_id" baseTableName="m_account_transfer_details"
constraintName="FK_m_account_transfer_details_from_savings_account" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="725">
<addForeignKeyConstraint baseColumnNames="to_client_id" baseTableName="m_account_transfer_details"
constraintName="FK_m_account_transfer_details_to_client" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="726">
<addForeignKeyConstraint baseColumnNames="to_loan_account_id" baseTableName="m_account_transfer_details"
constraintName="FK_m_account_transfer_details_to_loan_account" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="727">
<addForeignKeyConstraint baseColumnNames="to_office_id" baseTableName="m_account_transfer_details"
constraintName="FK_m_account_transfer_details_to_office" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="728">
<addForeignKeyConstraint baseColumnNames="to_savings_account_id" baseTableName="m_account_transfer_details"
constraintName="FK_m_account_transfer_details_to_savings_account" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="729">
<addForeignKeyConstraint baseColumnNames="standing_instruction_id"
baseTableName="m_account_transfer_standing_instructions_history"
constraintName="FK_m_account_transfer_standing_instructions_m_history"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id"
referencedTableName="m_account_transfer_standing_instructions" validate="true"/>
</changeSet>
<changeSet author="fineract" id="730">
<addForeignKeyConstraint baseColumnNames="account_transfer_details_id"
baseTableName="m_account_transfer_transaction"
constraintName="FK_m_account_transfer_transaction_account_detail" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_account_transfer_details"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="731">
<addForeignKeyConstraint baseColumnNames="from_loan_transaction_id"
baseTableName="m_account_transfer_transaction"
constraintName="FK_m_account_transfer_transaction_from_m_loan_transaction"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_transaction" validate="true"/>
</changeSet>
<changeSet author="fineract" id="732">
<addForeignKeyConstraint baseColumnNames="from_savings_transaction_id"
baseTableName="m_account_transfer_transaction"
constraintName="FK_m_account_transfer_transaction_from_m_savings_transaction"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account_transaction"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="733">
<addForeignKeyConstraint baseColumnNames="to_loan_transaction_id" baseTableName="m_account_transfer_transaction"
constraintName="FK_m_account_transfer_transaction_to_m_loan_transaction"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_transaction" validate="true"/>
</changeSet>
<changeSet author="fineract" id="734">
<addForeignKeyConstraint baseColumnNames="to_savings_transaction_id"
baseTableName="m_account_transfer_transaction"
constraintName="FK_m_account_transfer_transaction_to_m_savings_transaction"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account_transaction"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="735">
<addForeignKeyConstraint baseColumnNames="calendar_instance_id" baseTableName="m_meeting"
constraintName="FK_m_calendar_instance_m_meeting" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_calendar_instance" validate="true"/>
</changeSet>
<changeSet author="fineract" id="736">
<addForeignKeyConstraint baseColumnNames="calendar_id" baseTableName="m_calendar_history"
constraintName="FK_m_calendar_m_calendar_history" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_calendar" validate="true"/>
</changeSet>
<changeSet author="fineract" id="737">
<addForeignKeyConstraint baseColumnNames="calendar_id" baseTableName="m_calendar_instance"
constraintName="FK_m_calendar_m_calendar_instance" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_calendar" validate="true"/>
</changeSet>
<changeSet author="fineract" id="738">
<addForeignKeyConstraint baseColumnNames="staff_id" baseTableName="m_cashiers"
constraintName="FK_m_cashiers_m_staff" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_staff" validate="true"/>
</changeSet>
<changeSet author="fineract" id="739">
<addForeignKeyConstraint baseColumnNames="teller_id" baseTableName="m_cashiers"
constraintName="FK_m_cashiers_m_teller" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_tellers" validate="true"/>
</changeSet>
<changeSet author="fineract" id="740">
<addForeignKeyConstraint baseColumnNames="income_or_liability_account_id" baseTableName="m_charge"
constraintName="FK_m_charge_acc_gl_account" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="741">
<addForeignKeyConstraint baseColumnNames="tax_group_id" baseTableName="m_charge"
constraintName="FK_m_charge_m_tax_group" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_tax_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="742">
<addForeignKeyConstraint baseColumnNames="checker_id" baseTableName="m_portfolio_command_source"
constraintName="FK_m_checker_m_appuser" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="743">
<addForeignKeyConstraint baseColumnNames="charge_id" baseTableName="m_client_charge"
constraintName="FK_m_client_charge_m_charge" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="744">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_client_charge"
constraintName="FK_m_client_charge_m_client" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="745">
<addForeignKeyConstraint baseColumnNames="client_charge_id" baseTableName="m_client_charge_paid_by"
constraintName="FK_m_client_charge_paid_by_m_client_charge" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="746">
<addForeignKeyConstraint baseColumnNames="client_transaction_id" baseTableName="m_client_charge_paid_by"
constraintName="FK_m_client_charge_paid_by_m_client_transaction" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client_transaction" validate="true"/>
</changeSet>
<changeSet author="fineract" id="747">
<addForeignKeyConstraint baseColumnNames="client_classification_cv_id" baseTableName="m_client"
constraintName="FK_m_client_classification_m_code_value" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="748">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_client_identifier"
constraintName="FK_m_client_document_m_client" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="749">
<addForeignKeyConstraint baseColumnNames="document_type_id" baseTableName="m_client_identifier"
constraintName="FK_m_client_document_m_code_value" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="750">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_client_attendance"
constraintName="FK_m_client_m_client_attendance" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="751">
<addForeignKeyConstraint baseColumnNames="closure_reason_cv_id" baseTableName="m_client"
constraintName="FK_m_client_m_code" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="752">
<addForeignKeyConstraint baseColumnNames="image_id" baseTableName="m_client"
constraintName="FK_m_client_m_image" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_image" validate="true"/>
</changeSet>
<changeSet author="fineract" id="753">
<addForeignKeyConstraint baseColumnNames="transfer_to_office_id" baseTableName="m_client"
constraintName="FK_m_client_m_office" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="754">
<addForeignKeyConstraint baseColumnNames="default_savings_account" baseTableName="m_client"
constraintName="FK_m_client_m_savings_account" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="755">
<addForeignKeyConstraint baseColumnNames="default_savings_product" baseTableName="m_client"
constraintName="FK_m_client_m_savings_product" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_product" validate="true"/>
</changeSet>
<changeSet author="fineract" id="756">
<addForeignKeyConstraint baseColumnNames="staff_id" baseTableName="m_client"
constraintName="FK_m_client_m_staff" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_staff" validate="true"/>
</changeSet>
<changeSet author="fineract" id="757">
<addForeignKeyConstraint baseColumnNames="sub_status" baseTableName="m_client"
constraintName="FK_m_client_substatus_m_code_value" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="758">
<addForeignKeyConstraint baseColumnNames="appuser_id" baseTableName="m_client_transaction"
constraintName="FK_m_client_transaction_m_appuser" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="759">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_client_transaction"
constraintName="FK_m_client_transaction_m_client" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="760">
<addForeignKeyConstraint baseColumnNames="submitted_by" baseTableName="m_client_transfer_details"
constraintName="FK_m_client_transfer_details_m_appuser" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="761">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_client_transfer_details"
constraintName="FK_m_client_transfer_details_m_client" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="762">
<addForeignKeyConstraint baseColumnNames="from_office_id" baseTableName="m_client_transfer_details"
constraintName="FK_m_client_transfer_details_m_office" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="763">
<addForeignKeyConstraint baseColumnNames="to_office_id" baseTableName="m_client_transfer_details"
constraintName="FK_m_client_transfer_details_m_office_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="764">
<addForeignKeyConstraint baseColumnNames="client_type_cv_id" baseTableName="m_client"
constraintName="FK_m_client_type_m_code_value" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="765">
<addForeignKeyConstraint baseColumnNames="withdraw_reason_cv_id" baseTableName="m_client"
constraintName="FK_m_client_type_m_code_value_withdraw" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="766">
<addForeignKeyConstraint baseColumnNames="reject_reason_cv_id" baseTableName="m_client"
constraintName="FK_m_client_type_mcode_value_reject" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="767">
<addForeignKeyConstraint baseColumnNames="tag_id" baseTableName="acc_rule_tags"
constraintName="FK_m_code_value_id" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="768">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_family_members"
constraintName="FK_m_family_members_client_id_m_client" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="769">
<addForeignKeyConstraint baseColumnNames="gender_cv_id" baseTableName="m_family_members"
constraintName="FK_m_family_members_gender_m_code_value" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="770">
<addForeignKeyConstraint baseColumnNames="marital_status_cv_id" baseTableName="m_family_members"
constraintName="FK_m_family_members_marital_status_m_code_value" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="771">
<addForeignKeyConstraint baseColumnNames="profession_cv_id" baseTableName="m_family_members"
constraintName="FK_m_family_members_profession_m_code_value" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="772">
<addForeignKeyConstraint baseColumnNames="relationship_cv_id" baseTableName="m_family_members"
constraintName="FK_m_family_members_relationship_m_code_value" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="773">
<addForeignKeyConstraint baseColumnNames="level_id" baseTableName="m_group" constraintName="FK_m_group_level"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_group_level" validate="true"/>
</changeSet>
<changeSet author="fineract" id="774">
<addForeignKeyConstraint baseColumnNames="closure_reason_cv_id" baseTableName="m_group"
constraintName="FK_m_group_m_code" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="775">
<addForeignKeyConstraint baseColumnNames="staff_id" baseTableName="m_group" constraintName="FK_m_group_m_staff"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_staff" validate="true"/>
</changeSet>
<changeSet author="fineract" id="776">
<addForeignKeyConstraint baseColumnNames="account_associations_id" baseTableName="m_guarantor_funding_details"
constraintName="FK_m_guarantor_fund_details_account_associations_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_portfolio_account_associations"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="777">
<addForeignKeyConstraint baseColumnNames="guarantor_id" baseTableName="m_guarantor_funding_details"
constraintName="FK_m_guarantor_fund_details_m_guarantor" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_guarantor" validate="true"/>
</changeSet>
<changeSet author="fineract" id="778">
<addForeignKeyConstraint baseColumnNames="client_reln_cv_id" baseTableName="m_guarantor"
constraintName="FK_m_guarantor_m_code_value" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="779">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_guarantor"
constraintName="FK_m_guarantor_m_loan" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="780">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_import_document"
constraintName="FK_m_import_m_appuser" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="781">
<addForeignKeyConstraint baseColumnNames="document_id" baseTableName="m_import_document"
constraintName="FK_m_import_m_document" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_document" validate="true"/>
</changeSet>
<changeSet author="fineract" id="782">
<addForeignKeyConstraint baseColumnNames="interest_rate_slab_id" baseTableName="m_interest_incentives"
constraintName="FK_m_interest_incentives_m_interest_rate_slab" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_interest_rate_slab" validate="true"/>
</changeSet>
<changeSet author="fineract" id="783">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_recalculation_details"
constraintName="FK_m_loan_m_loan_recalculation_details" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="784">
<addForeignKeyConstraint baseColumnNames="loan_officer_id" baseTableName="m_loan"
constraintName="FK_m_loan_m_staff" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_staff" validate="true"/>
</changeSet>
<changeSet author="fineract" id="785">
<addForeignKeyConstraint baseColumnNames="loan_charge_id" baseTableName="m_loan_overdue_installment_charge"
constraintName="FK_m_loan_overdue_installment_charge_m_loan_charge" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="786">
<addForeignKeyConstraint baseColumnNames="loan_schedule_id" baseTableName="m_loan_overdue_installment_charge"
constraintName="FK_m_loan_overdue_installment_charge_m_loan_repayment_schedule"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_repayment_schedule"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="787">
<addForeignKeyConstraint baseColumnNames="charge_id" baseTableName="m_loan_tranche_charges"
constraintName="FK_m_loan_tranche_charges_m_charge" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="788">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_tranche_charges"
constraintName="FK_m_loan_tranche_charges_m_loan" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="789">
<addForeignKeyConstraint baseColumnNames="loan_charge_id" baseTableName="m_loan_tranche_disbursement_charge"
constraintName="FK_m_loan_tranche_disbursement_charge_m_loan_charge" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="790">
<addForeignKeyConstraint baseColumnNames="disbursement_detail_id"
baseTableName="m_loan_tranche_disbursement_charge"
constraintName="FK_m_loan_tranche_disbursement_charge_m_loan_disbursement_detail"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_disbursement_detail"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="791">
<addForeignKeyConstraint baseColumnNames="office_id" baseTableName="m_loan_transaction"
constraintName="FK_m_loan_transaction_m_office" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="792">
<addForeignKeyConstraint baseColumnNames="payment_detail_id" baseTableName="m_loan_transaction"
constraintName="FK_m_loan_transaction_m_payment_detail" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_payment_detail" validate="true"/>
</changeSet>
<changeSet author="fineract" id="793">
<addForeignKeyConstraint baseColumnNames="loanpurpose_cv_id" baseTableName="m_loan"
constraintName="FK_m_loanpurpose_codevalue" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="794">
<addForeignKeyConstraint baseColumnNames="maker_id" baseTableName="m_portfolio_command_source"
constraintName="FK_m_maker_m_appuser" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="795">
<addForeignKeyConstraint baseColumnNames="meeting_id" baseTableName="m_client_attendance"
constraintName="FK_m_meeting_m_client_attendance" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_meeting" validate="true"/>
</changeSet>
<changeSet author="fineract" id="796">
<addForeignKeyConstraint baseColumnNames="group_id" baseTableName="m_note" constraintName="FK_m_note_m_group"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="797">
<addForeignKeyConstraint baseColumnNames="payment_type_id" baseTableName="m_payment_detail"
constraintName="FK_m_payment_detail_m_payment_type" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_payment_type" validate="true"/>
</changeSet>
<changeSet author="fineract" id="798">
<addForeignKeyConstraint baseColumnNames="payment_type_id" baseTableName="m_charge"
constraintName="FK_m_payment_detail_m_payment_types" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_payment_type" validate="true"/>
</changeSet>
<changeSet author="fineract" id="799">
<addForeignKeyConstraint baseColumnNames="product_id" baseTableName="m_product_loan_recalculation_details"
constraintName="FK_m_product_loan_m_product_loan_recalculation_details"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="800">
<addForeignKeyConstraint baseColumnNames="product_id" baseTableName="m_product_mix"
constraintName="FK_m_product_mix_product_id_to_m_product_loan" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="801">
<addForeignKeyConstraint baseColumnNames="restricted_product_id" baseTableName="m_product_mix"
constraintName="FK_m_product_mix_restricted_product_id_to_m_product_loan"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="802">
<addForeignKeyConstraint baseColumnNames="office_id" baseTableName="m_savings_account_transaction"
constraintName="FK_m_savings_account_transaction_m_office" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="803">
<addForeignKeyConstraint baseColumnNames="payment_detail_id" baseTableName="m_savings_account_transaction"
constraintName="FK_m_savings_account_transaction_m_payment_detail" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_payment_detail" validate="true"/>
</changeSet>
<changeSet author="fineract" id="804">
<addForeignKeyConstraint baseColumnNames="deposit_account_interest_rate_slab_id"
baseTableName="m_savings_interest_incentives"
constraintName="FK_m_savings_interest_incentives_m_savings_interest_rate_slab"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account_interest_rate_slab"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="805">
<addForeignKeyConstraint baseColumnNames="account_id" baseTableName="m_share_account_dividend_details"
constraintName="FK_m_share_account_dividend_details_account_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_share_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="806">
<addForeignKeyConstraint baseColumnNames="dividend_pay_out_id" baseTableName="m_share_account_dividend_details"
constraintName="FK_m_share_account_dividend_details_dividend_pay_out_id"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_share_product_dividend_pay_out"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="807">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_share_product_dividend_pay_out"
constraintName="FK_m_share_product_dividend_pay_out_createdby_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="808">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="m_share_product_dividend_pay_out"
constraintName="FK_m_share_product_dividend_pay_out_lastmodifiedby_id"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="809">
<addForeignKeyConstraint baseColumnNames="product_id" baseTableName="m_share_product_dividend_pay_out"
constraintName="FK_m_share_product_dividend_pay_out_product_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_share_product" validate="true"/>
</changeSet>
<changeSet author="fineract" id="810">
<addForeignKeyConstraint baseColumnNames="centre_id" baseTableName="m_staff_assignment_history"
constraintName="FK_m_staff_assignment_history_centre_id_m_group" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="811">
<addForeignKeyConstraint baseColumnNames="staff_id" baseTableName="m_staff_assignment_history"
constraintName="FK_m_staff_assignment_history_m_staff" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_staff" validate="true"/>
</changeSet>
<changeSet author="fineract" id="812">
<addForeignKeyConstraint baseColumnNames="image_id" baseTableName="m_staff" constraintName="FK_m_staff_m_image"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_image" validate="true"/>
</changeSet>
<changeSet author="fineract" id="813">
<addForeignKeyConstraint baseColumnNames="office_id" baseTableName="m_staff"
constraintName="FK_m_staff_m_office" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="814">
<addForeignKeyConstraint baseColumnNames="account_transfer_details_id"
baseTableName="m_account_transfer_standing_instructions"
constraintName="FK_m_standing_instructions_account_transfer_details" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_account_transfer_details"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="815">
<addForeignKeyConstraint baseColumnNames="cashier_id" baseTableName="m_cashier_transactions"
constraintName="FK_m_teller_transactions_m_cashiers" deferrable="false"
initiallyDeferred="false" onDelete="CASCADE" onUpdate="CASCADE"
referencedColumnNames="id" referencedTableName="m_cashiers" validate="true"/>
</changeSet>
<changeSet author="fineract" id="816">
<addForeignKeyConstraint baseColumnNames="credit_account_id" baseTableName="m_tellers"
constraintName="FK_m_tellers_gl_account_credit_account_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="817">
<addForeignKeyConstraint baseColumnNames="debit_account_id" baseTableName="m_tellers"
constraintName="FK_m_tellers_gl_account_debit_account_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="818">
<addForeignKeyConstraint baseColumnNames="office_id" baseTableName="m_tellers"
constraintName="FK_m_tellers_m_office" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="819">
<addForeignKeyConstraint baseColumnNames="floating_rates_id" baseTableName="m_floating_rates_periods"
constraintName="FK_mappings_m_floating_rates" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_floating_rates" validate="true"/>
</changeSet>
<changeSet author="fineract" id="820">
<addForeignKeyConstraint baseColumnNames="floating_rates_id" baseTableName="m_product_loan_floating_rates"
constraintName="FK_mappings_m_floating_rates_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_floating_rates" validate="true"/>
</changeSet>
<changeSet author="fineract" id="821">
<addForeignKeyConstraint baseColumnNames="loan_repayment_schedule_id"
baseTableName="m_loan_transaction_repayment_schedule_mapping"
constraintName="FK_mappings_m_loan_repayment_schedule" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_repayment_schedule"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="822">
<addForeignKeyConstraint baseColumnNames="loan_transaction_id"
baseTableName="m_loan_transaction_repayment_schedule_mapping"
constraintName="FK_mappings_m_loan_transaction" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_transaction" validate="true"/>
</changeSet>
<changeSet author="fineract" id="823">
<addForeignKeyConstraint baseColumnNames="loan_product_id" baseTableName="m_product_loan_floating_rates"
constraintName="FK_mappings_m_product_loan_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="824">
<addForeignKeyConstraint baseColumnNames="loan_product_id"
baseTableName="m_product_loan_variable_installment_config"
constraintName="FK_mappings_m_variable_product_loan_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="825">
<addForeignKeyConstraint baseColumnNames="gl_account_id" baseTableName="acc_gl_financial_activity_account"
constraintName="FK_office_mapping_acc_gl_account" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="826">
<addForeignKeyConstraint baseColumnNames="rejectedon_userid" baseTableName="m_loan"
constraintName="FK_rejectedon_userid" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="827">
<addForeignKeyConstraint baseColumnNames="savings_account_id" baseTableName="m_note"
constraintName="FK_savings_account_id" deferrable="false" initiallyDeferred="false"
onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="id"
referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="828">
<addForeignKeyConstraint baseColumnNames="tax_group_id" baseTableName="m_savings_account"
constraintName="FK_savings_account_tax_group" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_tax_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="829">
<addForeignKeyConstraint baseColumnNames="savings_transaction_id"
baseTableName="m_savings_account_transaction_tax_details"
constraintName="FK_savings_account_transaction_tax_details_savings_transaction"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account_transaction"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="830">
<addForeignKeyConstraint baseColumnNames="tax_component_id"
baseTableName="m_savings_account_transaction_tax_details"
constraintName="FK_savings_account_transaction_tax_details_tax_component"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_tax_component" validate="true"/>
</changeSet>
<changeSet author="fineract" id="831">
<addForeignKeyConstraint baseColumnNames="tax_group_id" baseTableName="m_savings_product"
constraintName="FK_savings_product_tax_group" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_tax_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="832">
<addForeignKeyConstraint baseColumnNames="submittedon_userid" baseTableName="m_loan"
constraintName="FK_submittedon_userid" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="833">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_tax_component"
constraintName="FK_tax_component_createdby" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="834">
<addForeignKeyConstraint baseColumnNames="credit_account_id" baseTableName="m_tax_component"
constraintName="FK_tax_component_credit_gl_account" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="835">
<addForeignKeyConstraint baseColumnNames="debit_account_id" baseTableName="m_tax_component"
constraintName="FK_tax_component_debit_gl_account" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="836">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_tax_component_history"
constraintName="FK_tax_component_history_createdby" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="837">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="m_tax_component_history"
constraintName="FK_tax_component_history_lastmodifiedby" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="838">
<addForeignKeyConstraint baseColumnNames="tax_component_id" baseTableName="m_tax_component_history"
constraintName="FK_tax_component_history_tax_component_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_tax_component" validate="true"/>
</changeSet>
<changeSet author="fineract" id="839">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="m_tax_component"
constraintName="FK_tax_component_lastmodifiedby" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="840">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_tax_group"
constraintName="FK_tax_group_createdby" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="841">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="m_tax_group"
constraintName="FK_tax_group_lastmodifiedby" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="842">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_tax_group_mappings"
constraintName="FK_tax_group_mappings_createdby" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="843">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="m_tax_group_mappings"
constraintName="FK_tax_group_mappings_lastmodifiedby" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="844">
<addForeignKeyConstraint baseColumnNames="tax_component_id" baseTableName="m_tax_group_mappings"
constraintName="FK_tax_group_mappings_tax_component" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_tax_component" validate="true"/>
</changeSet>
<changeSet author="fineract" id="845">
<addForeignKeyConstraint baseColumnNames="tax_group_id" baseTableName="m_tax_group_mappings"
constraintName="FK_tax_group_mappings_tax_group" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_tax_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="846">
<addForeignKeyConstraint baseColumnNames="withdrawnon_userid" baseTableName="m_loan"
constraintName="FK_withdrawnon_userid" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="847">
<addForeignKeyConstraint baseColumnNames="writeoff_reason_cv_id" baseTableName="m_loan"
constraintName="FK_writeoffreason_m_loan_m_code_value" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="848">
<addForeignKeyConstraint baseColumnNames="code_id" baseTableName="x_table_column_code_mappings"
constraintName="FK_x_code_id" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_code" validate="true"/>
</changeSet>
<changeSet author="fineract" id="849">
<addForeignKeyConstraint baseColumnNames="parent_id" baseTableName="m_group"
constraintName="Parent_Id_reference" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="850">
<addForeignKeyConstraint baseColumnNames="parent_id" baseTableName="m_group_level"
constraintName="Parent_levelId_reference" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_group_level" validate="true"/>
</changeSet>
<changeSet author="fineract" id="851">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="scheduled_email_messages_outbound"
constraintName="SEFKCLIENT00000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="852">
<addForeignKeyConstraint baseColumnNames="group_id" baseTableName="scheduled_email_messages_outbound"
constraintName="SEFKGROUP000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="853">
<addForeignKeyConstraint baseColumnNames="staff_id" baseTableName="scheduled_email_messages_outbound"
constraintName="SEFKSTAFF000000001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_staff" validate="true"/>
</changeSet>
<changeSet author="fineract" id="854">
<addForeignKeyConstraint baseColumnNames="loan_account_id" baseTableName="m_portfolio_account_associations"
constraintName="account_association_loan_fk" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="855">
<addForeignKeyConstraint baseColumnNames="savings_account_id" baseTableName="m_portfolio_account_associations"
constraintName="account_association_savings_fk" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="856">
<addForeignKeyConstraint baseColumnNames="address_type_id" baseTableName="m_client_address"
constraintName="address_codefk" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="857">
<addForeignKeyConstraint baseColumnNames="state_province_id" baseTableName="m_address"
constraintName="address_fields_codefk1" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="858">
<addForeignKeyConstraint baseColumnNames="country_id" baseTableName="m_address"
constraintName="address_fields_codefk2" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="859">
<addForeignKeyConstraint baseColumnNames="loan_product_id"
baseTableName="m_product_loan_variations_borrower_cycle"
constraintName="borrower_cycle_loan_product_FK" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="860">
<addForeignKeyConstraint baseColumnNames="organisation_creditbureau_id"
baseTableName="m_creditbureau_configuration" constraintName="cbConfigfk1"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_creditbureau" validate="true"/>
</changeSet>
<changeSet author="fineract" id="861">
<addForeignKeyConstraint baseColumnNames="creditBureauId" baseTableName="m_creditreport" constraintName="cbId"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_creditbureau" validate="true"/>
</changeSet>
<changeSet author="fineract" id="862">
<addForeignKeyConstraint baseColumnNames="organisation_creditbureau_id"
baseTableName="m_creditbureau_loanproduct_mapping" constraintName="cblpfk2"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_organisation_creditbureau"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="863">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_client_address"
constraintName="clientaddressfk" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="864">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_adhoc" constraintName="createdby_id"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="865">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_client_collateral_management"
constraintName="fkClient" deferrable="false" initiallyDeferred="false"
onDelete="CASCADE" onUpdate="CASCADE" referencedColumnNames="id"
referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="866">
<addForeignKeyConstraint baseColumnNames="client_collateral_id" baseTableName="m_loan_collateral_management"
constraintName="fkClientCollateral" deferrable="false" initiallyDeferred="false"
onDelete="CASCADE" onUpdate="CASCADE" referencedColumnNames="id"
referencedTableName="m_client_collateral_management" validate="true"/>
</changeSet>
<changeSet author="fineract" id="867">
<addForeignKeyConstraint baseColumnNames="collateral_id" baseTableName="m_client_collateral_management"
constraintName="fkCollateral" deferrable="false" initiallyDeferred="false"
onDelete="CASCADE" onUpdate="CASCADE" referencedColumnNames="id"
referencedTableName="m_collateral_management" validate="true"/>
</changeSet>
<changeSet author="fineract" id="868">
<addForeignKeyConstraint baseColumnNames="currency" baseTableName="m_collateral_management"
constraintName="fkCurrencyCode" deferrable="false" initiallyDeferred="false"
onDelete="CASCADE" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_currency" validate="true"/>
</changeSet>
<changeSet author="fineract" id="869">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_collateral_management"
constraintName="fkLoan" deferrable="false" initiallyDeferred="false" onDelete="CASCADE"
onUpdate="CASCADE" referencedColumnNames="id" referencedTableName="m_loan"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="870">
<addForeignKeyConstraint baseColumnNames="transaction_id" baseTableName="m_loan_collateral_management"
constraintName="fkTransaction" deferrable="false" initiallyDeferred="false"
onDelete="CASCADE" onUpdate="CASCADE" referencedColumnNames="id"
referencedTableName="m_loan_transaction" validate="true"/>
</changeSet>
<changeSet author="fineract" id="871">
<addForeignKeyConstraint baseColumnNames="appuser_id" baseTableName="twofactor_access_token"
constraintName="fk_2fa_access_token_user_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="872">
<addForeignKeyConstraint baseColumnNames="loan_product_id" baseTableName="m_creditbureau_loanproduct_mapping"
constraintName="fk_cb_lp2" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="873">
<addForeignKeyConstraint baseColumnNames="hook_id" baseTableName="m_hook_configuration"
constraintName="fk_hook_id_cfg" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_hook" validate="true"/>
</changeSet>
<changeSet author="fineract" id="874">
<addForeignKeyConstraint baseColumnNames="hook_id" baseTableName="m_hook_registered_events"
constraintName="fk_hook_idc" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_hook" validate="true"/>
</changeSet>
<changeSet author="fineract" id="875">
<addForeignKeyConstraint baseColumnNames="hook_template_id" baseTableName="m_hook_schema"
constraintName="fk_hook_template_id" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_hook_templates" validate="true"/>
</changeSet>
<changeSet author="fineract" id="876">
<addForeignKeyConstraint baseColumnNames="account_id" baseTableName="interop_identifier"
constraintName="fk_interop_identifier_account" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="877">
<addForeignKeyConstraint baseColumnNames="staff_id" baseTableName="m_appuser" constraintName="fk_m_appuser_002"
deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
referencedColumnNames="id" referencedTableName="m_staff" validate="true"/>
</changeSet>
<changeSet author="fineract" id="878">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_officer_assignment_history"
constraintName="fk_m_loan_officer_assignment_history_0001" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="879">
<addForeignKeyConstraint baseColumnNames="loan_officer_id" baseTableName="m_loan_officer_assignment_history"
constraintName="fk_m_loan_officer_assignment_history_0002" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_staff" validate="true"/>
</changeSet>
<changeSet author="fineract" id="880">
<addForeignKeyConstraint baseColumnNames="loan_product_id"
baseTableName="m_product_loan_configurable_attributes"
constraintName="fk_m_product_loan_configurable_attributes_0001" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="881">
<addForeignKeyConstraint baseColumnNames="account_id" baseTableName="m_savings_officer_assignment_history"
constraintName="fk_m_savings_officer_assignment_history_0001" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="882">
<addForeignKeyConstraint baseColumnNames="savings_officer_id"
baseTableName="m_savings_officer_assignment_history"
constraintName="fk_m_savings_officer_assignment_history_0002" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_staff" validate="true"/>
</changeSet>
<changeSet author="fineract" id="883-mysql" context="mysql">
<addForeignKeyConstraint baseColumnNames="report_id" baseTableName="stretchy_report_parameter"
constraintName="fk_report_parameter_001" deferrable="false" initiallyDeferred="false"
onDelete="CASCADE" onUpdate="NO ACTION" referencedColumnNames="id"
referencedTableName="stretchy_report" validate="true"/>
</changeSet>
<changeSet author="fineract" id="884-mysql" context="mysql">
<addForeignKeyConstraint baseColumnNames="parameter_id" baseTableName="stretchy_report_parameter"
constraintName="fk_report_parameter_002" deferrable="false" initiallyDeferred="false"
onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="id"
referencedTableName="stretchy_parameter" validate="true"/>
</changeSet>
<changeSet author="fineract" id="885">
<addForeignKeyConstraint baseColumnNames="email_campaign_id" baseTableName="scheduled_email_messages_outbound"
constraintName="fk_schedule_email_campign1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="scheduled_email_campaign"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="886">
<addForeignKeyConstraint baseColumnNames="parent_id" baseTableName="stretchy_parameter"
constraintName="fk_stretchy_parameter_001" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="stretchy_parameter" validate="true"/>
</changeSet>
<changeSet author="fineract" id="887">
<addForeignKeyConstraint baseColumnNames="template_id" baseTableName="m_hook" constraintName="fk_template_id"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_hook_templates" validate="true"/>
</changeSet>
<changeSet author="fineract" id="888">
<addForeignKeyConstraint baseColumnNames="user_id" baseTableName="topic_subscriber"
constraintName="fk_topic_has_m_appuser_m_appuser1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="889">
<addForeignKeyConstraint baseColumnNames="topic_id" baseTableName="topic_subscriber"
constraintName="fk_topic_has_m_appuser_topic" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="topic" validate="true"/>
</changeSet>
<changeSet author="fineract" id="890">
<addForeignKeyConstraint baseColumnNames="ugd_template_id" baseTableName="m_hook"
constraintName="fk_ugd_template_id" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_template" validate="true"/>
</changeSet>
<changeSet author="fineract" id="891">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_repayment_with_post_dated_checks"
constraintName="fkloanrepayment" deferrable="false" initiallyDeferred="false"
onDelete="CASCADE" onUpdate="CASCADE" referencedColumnNames="id"
referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="892">
<addForeignKeyConstraint baseColumnNames="repayment_id" baseTableName="m_repayment_with_post_dated_checks"
constraintName="fkrepaymentwithpostdated" deferrable="false" initiallyDeferred="false"
onDelete="CASCADE" onUpdate="CASCADE" referencedColumnNames="id"
referencedTableName="m_loan_repayment_schedule" validate="true"/>
</changeSet>
<changeSet author="fineract" id="893">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="m_adhoc"
constraintName="lastmodifiedby_id" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="894">
<addForeignKeyConstraint baseColumnNames="linked_loan_account_id"
baseTableName="m_portfolio_account_associations" constraintName="linked_loan_fk"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="895">
<addForeignKeyConstraint baseColumnNames="linked_savings_account_id"
baseTableName="m_portfolio_account_associations" constraintName="linked_savings_fk"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="896">
<addForeignKeyConstraint baseColumnNames="user_id" baseTableName="m_appuser_previous_password"
constraintName="m_appuser_previous_password_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="897">
<addForeignKeyConstraint baseColumnNames="transfer_to_savings_account_id"
baseTableName="m_deposit_account_term_and_preclosure"
constraintName="m_deposit_account_term_and_preclosure_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="898">
<addForeignKeyConstraint baseColumnNames="x_registered_table_name" baseTableName="m_entity_datatable_check"
constraintName="m_entity_datatable_check_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="registered_table_name" referencedTableName="x_registered_table"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="899">
<addForeignKeyConstraint baseColumnNames="group_id" baseTableName="m_group_client"
constraintName="m_group_client_ibfk_1" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="900">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_group_client"
constraintName="m_group_client_ibfk_2" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="901">
<addForeignKeyConstraint baseColumnNames="office_id" baseTableName="m_group" constraintName="m_group_ibfk_1"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="902">
<addForeignKeyConstraint baseColumnNames="holiday_id" baseTableName="m_holiday_office"
constraintName="m_holiday_id_ibfk_1" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_holiday" validate="true"/>
</changeSet>
<changeSet author="fineract" id="903">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_arrears_aging"
constraintName="m_loan_arrears_aging_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="904">
<addForeignKeyConstraint baseColumnNames="charge_id" baseTableName="m_loan_charge"
constraintName="m_loan_charge_ibfk_1" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="905">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_charge"
constraintName="m_loan_charge_ibfk_2" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="906">
<addForeignKeyConstraint baseColumnNames="group_id" baseTableName="m_loan" constraintName="m_loan_ibfk_1"
deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_group" validate="true"/>
</changeSet>
<changeSet author="fineract" id="907">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_paid_in_advance"
constraintName="m_loan_paid_in_advance_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="908">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_repayment_schedule_history"
constraintName="m_loan_repayment_schedule_history_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="909">
<addForeignKeyConstraint baseColumnNames="loan_reschedule_request_id"
baseTableName="m_loan_repayment_schedule_history"
constraintName="m_loan_repayment_schedule_history_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_reschedule_request"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="910">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_reschedule_request"
constraintName="m_loan_reschedule_request_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="911">
<addForeignKeyConstraint baseColumnNames="reschedule_reason_cv_id" baseTableName="m_loan_reschedule_request"
constraintName="m_loan_reschedule_request_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_code_value" validate="true"/>
</changeSet>
<changeSet author="fineract" id="912">
<addForeignKeyConstraint baseColumnNames="submitted_by_user_id" baseTableName="m_loan_reschedule_request"
constraintName="m_loan_reschedule_request_ibfk_3" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="913">
<addForeignKeyConstraint baseColumnNames="approved_by_user_id" baseTableName="m_loan_reschedule_request"
constraintName="m_loan_reschedule_request_ibfk_4" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="914">
<addForeignKeyConstraint baseColumnNames="rejected_by_user_id" baseTableName="m_loan_reschedule_request"
constraintName="m_loan_reschedule_request_ibfk_5" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="915">
<addForeignKeyConstraint baseColumnNames="account_transfer_details_id" baseTableName="m_loan_topup"
constraintName="m_loan_topup_FK_account_transfer_details_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_account_transfer_details"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="916">
<addForeignKeyConstraint baseColumnNames="closure_loan_id" baseTableName="m_loan_topup"
constraintName="m_loan_topup_FK_closure_loan_id" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="917">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_topup"
constraintName="m_loan_topup_FK_loan_id" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="918">
<addForeignKeyConstraint baseColumnNames="history_id" baseTableName="m_loanproduct_provisioning_entry"
constraintName="m_loanproduct_provisioning_entry_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_provisioning_history"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="919">
<addForeignKeyConstraint baseColumnNames="criteria_id" baseTableName="m_loanproduct_provisioning_entry"
constraintName="m_loanproduct_provisioning_entry_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_provisioning_criteria"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="920">
<addForeignKeyConstraint baseColumnNames="office_id" baseTableName="m_loanproduct_provisioning_entry"
constraintName="m_loanproduct_provisioning_entry_ibfk_3" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="921">
<addForeignKeyConstraint baseColumnNames="product_id" baseTableName="m_loanproduct_provisioning_entry"
constraintName="m_loanproduct_provisioning_entry_ibfk_4" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="922">
<addForeignKeyConstraint baseColumnNames="category_id" baseTableName="m_loanproduct_provisioning_entry"
constraintName="m_loanproduct_provisioning_entry_ibfk_5" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_provision_category" validate="true"/>
</changeSet>
<changeSet author="fineract" id="923">
<addForeignKeyConstraint baseColumnNames="liability_account" baseTableName="m_loanproduct_provisioning_entry"
constraintName="m_loanproduct_provisioning_entry_ibfk_6" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="924">
<addForeignKeyConstraint baseColumnNames="expense_account" baseTableName="m_loanproduct_provisioning_entry"
constraintName="m_loanproduct_provisioning_entry_ibfk_7" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="925">
<addForeignKeyConstraint baseColumnNames="product_id" baseTableName="m_loanproduct_provisioning_mapping"
constraintName="m_loanproduct_provisioning_mapping_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="926">
<addForeignKeyConstraint baseColumnNames="criteria_id" baseTableName="m_loanproduct_provisioning_mapping"
constraintName="m_loanproduct_provisioning_mapping_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_provisioning_criteria"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="927">
<addForeignKeyConstraint baseColumnNames="office_id" baseTableName="m_holiday_office"
constraintName="m_office_id_ibfk_2" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_office" validate="true"/>
</changeSet>
<changeSet author="fineract" id="928">
<addForeignKeyConstraint baseColumnNames="charge_id" baseTableName="m_product_loan_charge"
constraintName="m_product_loan_charge_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="929">
<addForeignKeyConstraint baseColumnNames="product_loan_id" baseTableName="m_product_loan_charge"
constraintName="m_product_loan_charge_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_product_loan" validate="true"/>
</changeSet>
<changeSet author="fineract" id="930">
<addForeignKeyConstraint baseColumnNames="criteria_id" baseTableName="m_provisioning_criteria_definition"
constraintName="m_provisioning_criteria_definition_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_provisioning_criteria"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="931">
<addForeignKeyConstraint baseColumnNames="category_id" baseTableName="m_provisioning_criteria_definition"
constraintName="m_provisioning_criteria_definition_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_provision_category" validate="true"/>
</changeSet>
<changeSet author="fineract" id="932">
<addForeignKeyConstraint baseColumnNames="liability_account" baseTableName="m_provisioning_criteria_definition"
constraintName="m_provisioning_criteria_definition_ibfk_3" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="933">
<addForeignKeyConstraint baseColumnNames="expense_account" baseTableName="m_provisioning_criteria_definition"
constraintName="m_provisioning_criteria_definition_ibfk_4" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="acc_gl_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="934">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_provisioning_criteria"
constraintName="m_provisioning_criteria_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="935">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="m_provisioning_criteria"
constraintName="m_provisioning_criteria_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="936">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_provisioning_history"
constraintName="m_provisioning_history_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="937">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="m_provisioning_history"
constraintName="m_provisioning_history_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="938">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_report_mailing_job"
constraintName="m_report_mailing_job_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="939">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="m_report_mailing_job"
constraintName="m_report_mailing_job_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="940">
<addForeignKeyConstraint baseColumnNames="stretchy_report_id" baseTableName="m_report_mailing_job"
constraintName="m_report_mailing_job_ibfk_3" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="stretchy_report" validate="true"/>
</changeSet>
<changeSet author="fineract" id="941">
<addForeignKeyConstraint baseColumnNames="run_as_userid" baseTableName="m_report_mailing_job"
constraintName="m_report_mailing_job_ibfk_4" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="942">
<addForeignKeyConstraint baseColumnNames="job_id" baseTableName="m_report_mailing_job_run_history"
constraintName="m_report_mailing_job_run_history_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_report_mailing_job" validate="true"/>
</changeSet>
<changeSet author="fineract" id="943">
<addForeignKeyConstraint baseColumnNames="charge_id" baseTableName="m_savings_account_charge"
constraintName="m_savings_account_charge_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="944">
<addForeignKeyConstraint baseColumnNames="savings_account_id" baseTableName="m_savings_account_charge"
constraintName="m_savings_account_charge_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="945">
<addForeignKeyConstraint baseColumnNames="charge_id" baseTableName="m_savings_product_charge"
constraintName="m_savings_product_charge_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="946">
<addForeignKeyConstraint baseColumnNames="savings_product_id" baseTableName="m_savings_product_charge"
constraintName="m_savings_product_charge_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_savings_product" validate="true"/>
</changeSet>
<changeSet author="fineract" id="947">
<addForeignKeyConstraint baseColumnNames="appuser_id" baseTableName="m_selfservice_user_client_mapping"
constraintName="m_selfservice_appuser_id" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="948">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_selfservice_user_client_mapping"
constraintName="m_selfservice_client_id" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="949">
<addForeignKeyConstraint baseColumnNames="charge_id" baseTableName="m_share_account_charge"
constraintName="m_share_account_charge_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="950">
<addForeignKeyConstraint baseColumnNames="account_id" baseTableName="m_share_account_charge"
constraintName="m_share_account_charge_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_share_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="951">
<addForeignKeyConstraint baseColumnNames="product_id" baseTableName="m_share_account"
constraintName="m_share_account_ibfk_1" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_share_product" validate="true"/>
</changeSet>
<changeSet author="fineract" id="952">
<addForeignKeyConstraint baseColumnNames="savings_account_id" baseTableName="m_share_account"
constraintName="m_share_account_ibfk_2" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_savings_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="953">
<addForeignKeyConstraint baseColumnNames="submitted_userid" baseTableName="m_share_account"
constraintName="m_share_account_ibfk_3" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="954">
<addForeignKeyConstraint baseColumnNames="approved_userid" baseTableName="m_share_account"
constraintName="m_share_account_ibfk_4" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="955">
<addForeignKeyConstraint baseColumnNames="rejected_userid" baseTableName="m_share_account"
constraintName="m_share_account_ibfk_5" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="956">
<addForeignKeyConstraint baseColumnNames="activated_userid" baseTableName="m_share_account"
constraintName="m_share_account_ibfk_6" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="957">
<addForeignKeyConstraint baseColumnNames="closed_userid" baseTableName="m_share_account"
constraintName="m_share_account_ibfk_7" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="958">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="m_share_account"
constraintName="m_share_account_ibfk_8" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="959">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_share_account"
constraintName="m_share_account_ibfk_9" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="960">
<addForeignKeyConstraint baseColumnNames="account_id" baseTableName="m_share_account_transactions"
constraintName="m_share_account_purchased_shares_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_share_account" validate="true"/>
</changeSet>
<changeSet author="fineract" id="961">
<addForeignKeyConstraint baseColumnNames="share_transaction_id" baseTableName="m_share_account_charge_paid_by"
constraintName="m_share_account_transactions_charge_mapping_ibfk1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_share_account_transactions"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="962">
<addForeignKeyConstraint baseColumnNames="charge_transaction_id" baseTableName="m_share_account_charge_paid_by"
constraintName="m_share_account_transactions_charge_mapping_ibfk2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_share_account_charge"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="963">
<addForeignKeyConstraint baseColumnNames="charge_id" baseTableName="m_share_product_charge"
constraintName="m_share_product_charge_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_charge" validate="true"/>
</changeSet>
<changeSet author="fineract" id="964">
<addForeignKeyConstraint baseColumnNames="product_id" baseTableName="m_share_product_charge"
constraintName="m_share_product_charge_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_share_product" validate="true"/>
</changeSet>
<changeSet author="fineract" id="965">
<addForeignKeyConstraint baseColumnNames="createdby_id" baseTableName="m_share_product"
constraintName="m_share_product_ibfk_1" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="966">
<addForeignKeyConstraint baseColumnNames="lastmodifiedby_id" baseTableName="m_share_product"
constraintName="m_share_product_ibfk_2" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="967">
<addForeignKeyConstraint baseColumnNames="product_id" baseTableName="m_share_product_market_price"
constraintName="m_share_product_market_price_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_share_product" validate="true"/>
</changeSet>
<changeSet author="fineract" id="968">
<addForeignKeyConstraint baseColumnNames="survey_id" baseTableName="m_survey_components"
constraintName="m_survey_components_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_surveys" validate="true"/>
</changeSet>
<changeSet author="fineract" id="969">
<addForeignKeyConstraint baseColumnNames="survey_id" baseTableName="m_survey_lookup_tables"
constraintName="m_survey_lookup_tables_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_surveys" validate="true"/>
</changeSet>
<changeSet author="fineract" id="970">
<addForeignKeyConstraint baseColumnNames="survey_id" baseTableName="m_survey_questions"
constraintName="m_survey_questions_ibfk_1" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_surveys" validate="true"/>
</changeSet>
<changeSet author="fineract" id="971">
<addForeignKeyConstraint baseColumnNames="question_id" baseTableName="m_survey_responses"
constraintName="m_survey_responses_ibfk_1" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_survey_questions" validate="true"/>
</changeSet>
<changeSet author="fineract" id="972">
<addForeignKeyConstraint baseColumnNames="survey_id" baseTableName="m_survey_scorecards"
constraintName="m_survey_scorecards_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_surveys" validate="true"/>
</changeSet>
<changeSet author="fineract" id="973">
<addForeignKeyConstraint baseColumnNames="question_id" baseTableName="m_survey_scorecards"
constraintName="m_survey_scorecards_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_survey_questions" validate="true"/>
</changeSet>
<changeSet author="fineract" id="974">
<addForeignKeyConstraint baseColumnNames="response_id" baseTableName="m_survey_scorecards"
constraintName="m_survey_scorecards_ibfk_3" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_survey_responses" validate="true"/>
</changeSet>
<changeSet author="fineract" id="975">
<addForeignKeyConstraint baseColumnNames="user_id" baseTableName="m_survey_scorecards"
constraintName="m_survey_scorecards_ibfk_4" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="976">
<addForeignKeyConstraint baseColumnNames="client_id" baseTableName="m_survey_scorecards"
constraintName="m_survey_scorecards_ibfk_5" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_client" validate="true"/>
</changeSet>
<changeSet author="fineract" id="977">
<addForeignKeyConstraint baseColumnNames="user_id" baseTableName="notification_mapper"
constraintName="notification_mapper_ibfk_2" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/>
</changeSet>
<changeSet author="fineract" id="978">
<addForeignKeyConstraint baseColumnNames="notification_id" baseTableName="notification_mapper"
constraintName="notification_mapper_ibfk_3" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="notification_generator"
validate="true"/>
</changeSet>
<changeSet author="fineract" id="979">
<addForeignKeyConstraint baseColumnNames="creditbureau_id" baseTableName="m_organisation_creditbureau"
constraintName="orgcb_cbfk" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="m_creditbureau" validate="true"/>
</changeSet>
<changeSet author="fineract" id="980">
<addForeignKeyConstraint baseColumnNames="stretchy_report_id" baseTableName="scheduled_email_campaign"
constraintName="scheduled_email_campaign_ibfk_1" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="stretchy_report" validate="true"/>
</changeSet>
<changeSet author="fineract" id="981">
<addForeignKeyConstraint baseColumnNames="job_id" baseTableName="job_run_history"
constraintName="scheduledjobsFK" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="job" validate="true"/>
</changeSet>
<changeSet author="fineract" id="982">
<addForeignKeyConstraint baseColumnNames="report_id" baseTableName="sms_campaign"
constraintName="sms_campaign_ibfk_1" deferrable="false" initiallyDeferred="false"
onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id"
referencedTableName="stretchy_report" validate="true"/>
</changeSet>
</databaseChangeLog>