galovics opened a new pull request #2030:
URL: https://github.com/apache/fineract/pull/2030


   ## Description
   
   Describe the changes made and why they were made.
   
   Ignore if these details are present on the associated [Apache Fineract JIRA 
ticket](https://github.com/apache/fineract/pull/1284).
   
   
   ## Checklist
   
   Please make sure these boxes are checked before submitting your pull request 
- thanks!
   
   - [x] Write the commit message as per 
https://github.com/apache/fineract/#pull-requests
   
   - [x] Acknowledge that we will not review PRs that are not passing the build 
_("green")_ - it is your responsibility to get a proposed PR to pass the build, 
not primarily the project's maintainers.
   
   - [x] Create/update unit or integration tests for verifying the changes made.
   
   - [x] Follow coding conventions at 
https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
   
   - [x] Add required Swagger annotation and update API documentation at 
fineract-provider/src/main/resources/static/api-docs/apiLive.htm with details 
of any API changes
   
   - [x] Submission is not a "code dump".  (Large changes can be made "in 
repository" via a branch.  Ask on the developer mailing list for guidance, if 
required.)
   
   FYI our guidelines for code reviews are at 
https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.
   
   ## What's still missing
   * README.md update
   
   ## Functionality description
   Full change from Flyway migrations to Liquibase migration. The Liquibase 
migration files have been generated using Liquibase CLI and based on the latest 
develop commit (c66415dbfdcb54ff9dada4fdcee603fba7a151e2). There have been a 
couple manual changes to the changesets in the generated migrations since there 
were a few issues where the ordering of changes wasn't right or when the code 
was depending on some certain database naming for unique key constraints.
   
   The change includes an automatic forward schema upgrade from Flyway to 
Liquibase. There's no need to do anything manually. Upon startup, Fineract will 
decide on the status of the database - whether it's empty, whether it was 
running Flyway on the latest 1.6 Fineract version or if the database state 
represents a previous version of Fineract.
   
   The automatic upgrade works in 3 different ways depending on the scenario
   * If the database is completely empty, it's going to apply all changesets 
from the Liquibase changelogs
   * If the database is contains the changes from the last Flyway migration 
scripts included in Fineract 1.6. In that case, a seamless upgrade is going to 
happen to Liquibase
   * If the database contains Flyway changes but it's not running the latest 
migration scripts from 1.6 - i.e. the Fineract version being ran is pre-1.6. In 
that case the application startup will fail, notifying the operator in the logs 
that first they shall upgrade to 1.6 and then to 1.7
   
   ## Testing
   On top of the tests written for the changes the following cases have been 
checked manually, all of them passed successfully
   * Starting from an empty db
   * Starting from an empty db and then applying one new changeset
   * Starting from an existing flyway migrated db
   * Starting from an existing flyway migrated db and then applying one new 
changeset
   * Starting from an existing flyway migrated db which is not running the 
latest structure on tenant store, app should fail
   * Starting from an existing flyway migrated db which is not running the 
latest structure on tenant, app should fail
   * Starting from an existing flyway migrated db which is not running the 
latest structure on tenant but upgrades to 1.6 then applies Liquibase changes
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to