diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index bbfadc13970..73af6348291 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -304,6 +304,26 @@ jib { } } +task migrateDatabase { + doFirst { + println 'Executing liquibase database migration to version '+"$dbVersion" + + def dbUrl='jdbc:'+"$dbType"+'://'+"$dbHost"+':'+"$dbPort"+'/'+"$dbName" + def changeLogFilePath='fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_'+"$dbVersion"+'.xml' + + liquibase { + activities { + main { + changeLogFile changeLogFilePath + url dbUrl + username project.ext.mysqlUser + password project.ext.mysqlPassword + } + } + } + } +} + tasks.jibDockerBuild.dependsOn(bootJar) // Configuration for git properties gradle plugin diff --git a/fineract-provider/src/main/resources/db/changelog/tenant-store/upgrades/0000_upgrade_to_1.6.xml b/fineract-provider/src/main/resources/db/changelog/tenant-store/upgrades/0000_upgrade_to_1.6.xml new file mode 100644 index 00000000000..83e384d5f83 --- /dev/null +++ b/fineract-provider/src/main/resources/db/changelog/tenant-store/upgrades/0000_upgrade_to_1.6.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.5.xml b/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.5.xml new file mode 100644 index 00000000000..832b65aeeb2 --- /dev/null +++ b/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.5.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.6.xml b/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.6.xml new file mode 100644 index 00000000000..2f7fab2f87a --- /dev/null +++ b/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.6.xml @@ -0,0 +1,526 @@ + + + + + + + UPDATE stretchy_report SET report_name = TRIM(report_name) WHERE id IN (SELECT id FROM (SELECT id FROM stretchy_report WHERE CHAR_LENGTH(report_name) != CHAR_LENGTH(TRIM(report_name)))Y); + + + + + + + SELECT COUNT(*) FROM stretchy_report WHERE report_name IN ('Loan Approved - Email','Loan Rejected - Email','Loan Repayment - Email'); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + code = 'SZL' + + + + code = 'SZL' + + + + + + + + + + + + + + + + + + + + + + name = 'is-interest-to-be-appropriated-equally-when-greater-than-emi' + + + + + + + + + + + + + + + + + + + + + + +