-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FINERACT-1846: Translate Flyway migrations to Liquibase for version 1… (
#2847) * FINERACT-1846: Translate Flyway migrations to Liquibase for version 1.4 to 1.6 * FINERACT-1846: Translate Flyway migrations to Liquibase for version 1.4 to 1.6 Co-authored-by: Jose Alberto Hernandez <[email protected]>
- Loading branch information
1 parent
a25acf0
commit 34680f6
Showing
4 changed files
with
681 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...ct-provider/src/main/resources/db/changelog/tenant-store/upgrades/0000_upgrade_to_1.6.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?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"> | ||
<!-- V5__add_schema_connection_parameters.sql --> | ||
<changeSet author="fineract" id="5"> | ||
<addColumn tableName="tenant_server_connections"> | ||
<column name="schema_connection_parameters" type="TEXT" defaultValueComputed="NULL"/> | ||
</addColumn> | ||
</changeSet> | ||
<!-- V6__add_unique_tenant_identifier.sql --> | ||
<changeSet author="fineract" id="6"> | ||
<addUniqueConstraint tableName="tenants" columnNames="identifier" /> | ||
</changeSet> | ||
</databaseChangeLog> |
100 changes: 100 additions & 0 deletions
100
fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.5.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?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"> | ||
<!-- V362__reschedule_interest_to_lrs.sql --> | ||
<changeSet author="fineract" id="362"> | ||
<addColumn tableName="m_loan_repayment_schedule"> | ||
<column name="reschedule_interest_portion" type="decimal(19,6)" defaultValueComputed="NULL" position="14" /> | ||
</addColumn> | ||
</changeSet> | ||
<!-- V363__mnote_indexing_for_performance.sql --> | ||
<changeSet author="fineract" id="363"> | ||
<createIndex indexName="savings_account_transaction_id" tableName="m_note"> | ||
<column defaultValueComputed="NULL" name="savings_account_transaction_id"/> | ||
</createIndex> | ||
</changeSet> | ||
<!-- V364__elastic_hook_template.sql --> | ||
<changeSet author="fineract" id="364"> | ||
<insert tableName="m_hook_templates"> | ||
<column name="id" valueNumeric="3"/> | ||
<column name="name" value="Elastic Search"/> | ||
</insert> | ||
<insert tableName="m_hook_schema"> | ||
<column name="id" valueNumeric="8"/> | ||
<column name="hook_template_id" valueNumeric="3"/> | ||
<column name="field_type" value="string"/> | ||
<column name="field_name" value="Payload URL"/> | ||
<column name="placeholder" value="http://<host>/<index name>/<type name>"/> | ||
<column name="optional" valueBoolean="false"/> | ||
</insert> | ||
<insert tableName="m_hook_schema"> | ||
<column name="id" valueNumeric="9"/> | ||
<column name="hook_template_id" valueNumeric="3"/> | ||
<column name="field_type" value="string"/> | ||
<column name="field_name" value="Content Type"/> | ||
<column name="placeholder" value="json"/> | ||
<column name="optional" valueBoolean="false"/> | ||
</insert> | ||
<insert tableName="m_hook_schema"> | ||
<column name="id" valueNumeric="10"/> | ||
<column name="hook_template_id" valueNumeric="3"/> | ||
<column name="field_type" value="string"/> | ||
<column name="field_name" value="Index Name"/> | ||
<column name="placeholder"/> | ||
<column name="optional" valueBoolean="true"/> | ||
</insert> | ||
</changeSet> | ||
<!-- V365__reportCategoryList-FINERACT-1306.sql --> | ||
<changeSet author="fineract" id="365"> | ||
<insert tableName="stretchy_parameter"> | ||
<column name="id" valueNumeric="1003"/> | ||
<column name="parameter_name" value="reportCategoryList"/> | ||
<column name="parameter_variable"/> | ||
<column name="parameter_label" value="n/a"/> | ||
<column name="parameter_displayType" value="n/a"/> | ||
<column name="parameter_FormatType" value="n/a"/> | ||
<column name="parameter_default" value="n/a"/> | ||
<column name="special" value="Y"/> | ||
<column name="selectOne"/> | ||
<column name="selectAll"/> | ||
<column name="parameter_sql" | ||
value="select r.id as report_id, r.report_name, r.report_type, r.report_subtype, r.report_category, rp.id as parameter_id, rp.report_parameter_name, p.parameter_name from stretchy_report r left join stretchy_report_parameter rp on rp.report_id = r.id left join stretchy_parameter p on p.id = rp.parameter_id where r.report_category = '${reportCategory}' and r.use_report is true and r.self_service_user_report = '${isSelfServiceUser}' and exists (select 'f' from m_appuser_role ur join m_role r on r.id = ur.role_id join m_role_permission rp on rp.role_id = r.id join m_permission p on p.id = rp.permission_id where ur.appuser_id = ${currentUserId} and (p.code in ('ALL_FUNCTIONS_READ', 'ALL_FUNCTIONS') or p.code = concat("READ_", r.report_name)) ) order by r.report_category, r.report_name, rp.id"/> | ||
<column name="parent_id"/> | ||
</insert> | ||
<insert tableName="stretchy_parameter"> | ||
<column name="id" valueNumeric="1004"/> | ||
<column name="parameter_name" value="selectAccount"/> | ||
<column name="parameter_variable" value="accountNo"/> | ||
<column name="parameter_label" value="Enter Account No"/> | ||
<column name="parameter_displayType" value="text"/> | ||
<column name="parameter_FormatType" value="string"/> | ||
<column name="parameter_default" value="n/a"/> | ||
<column name="special"/> | ||
<column name="selectOne"/> | ||
<column name="selectAll"/> | ||
<column name="parameter_sql"/> | ||
<column name="parent_id"/> | ||
</insert> | ||
</changeSet> | ||
</databaseChangeLog> |
Oops, something went wrong.