diff --git a/custom/acme/note/starter/src/main/resources/db/custom-changelog/parts/0001_acme_note_initial.xml b/custom/acme/note/starter/src/main/resources/db/custom-changelog/0001_acme_note_initial.xml similarity index 100% rename from custom/acme/note/starter/src/main/resources/db/custom-changelog/parts/0001_acme_note_initial.xml rename to custom/acme/note/starter/src/main/resources/db/custom-changelog/0001_acme_note_initial.xml diff --git a/custom/acme/note/starter/src/main/resources/db/custom-changelog/changelog-acme-note.xml b/custom/acme/note/starter/src/main/resources/db/custom-changelog/changelog-acme-note.xml deleted file mode 100644 index 601ba8f08..000000000 --- a/custom/acme/note/starter/src/main/resources/db/custom-changelog/changelog-acme-note.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - diff --git a/fineract-doc/src/docs/en/chapters/architecture/modules.adoc b/fineract-doc/src/docs/en/chapters/architecture/modules.adoc index 50d63367b..0349c060c 100644 --- a/fineract-doc/src/docs/en/chapters/architecture/modules.adoc +++ b/fineract-doc/src/docs/en/chapters/architecture/modules.adoc @@ -63,6 +63,15 @@ If database migrations are needed as part of your customizations then you can ad include::{diagramsdir}/custom-db-migration-folder-structure.puml[] ---- +And here an example migration script: + +[source,xml] +---- +include::{rootdir}/custom/acme/note/starter/src/main/resources/db/custom-changelog/0001_acme_note_initial.xml[lines=22..] +---- + +IMPORTANT: By default custom database migration changelogs are executed in context `tenant_db`. That makes sure your changes will be applied to the tenant database (read: main database and not the tenant store database). In theory you could also target the tenant configuration database, but it's not recommended to do that. + === Deployment Custom modules (better: the JAR files) only need to be dropped in Fineract's `libs` folder if you run Fineract from the Spring Boot JAR file. Dynamic loading of external JARs is provided since Fineract version 1.5.0. For your convenience we've created a separate Docker image module that automatically includes your custom modules (see `custom/docker`). You can build this Docker image with diff --git a/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml b/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml index 266a6ff77..1e3d3e114 100644 --- a/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml +++ b/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml @@ -31,5 +31,5 @@ - +