Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/vf/100-change-liquibase-changese…
Browse files Browse the repository at this point in the history
…ts-managements-to-use-several-files' into vf/100-change-liquibase-changesets-managements-to-use-several-files

# Conflicts:
#	src/main/resources/application.yaml
  • Loading branch information
ValentinFutterer committed Nov 27, 2023
2 parents 7324a91 + ae5ccad commit cb38aa2
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
20 changes: 20 additions & 0 deletions CUSTOMISING.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,26 @@ every new damap version has to be checked for new changesets you might want to i
Also before version 3, all changesets where kept in db/changeLog.yaml. If you might want to remove certain changesets in
this file, you would have to create your own version in your institutional folder.
If you want to customize liquibase for your own institutional backend:
- Create a new folder in db with your institutions name - like e.g. tuwien
- Create your own root changelog and change the liquibase path in application.yaml to point to your new root changelog
- Your new root changelog should look something like this:
```yaml
databaseChangeLog:
- include:
file: db/tuwien/changeLog-root.yaml
```
- This include statement makes sure, that all damap changesets are automatically included in your seperate backend
- After that, you can create your own changelogs in your custom institutional folder and include them in your root
- Damap uses sequential integers as ids - to avoid conflicts, you should adpopt your own id system, that does not clash
with damap. Liquibase allows any type of id, as long as it is unique - e.g. tuwien_1, tuwien_2...
If you want to completely do your own thing, keep everything above the same, but instead of including the changeLog-root.yaml
file, include every changeset you want to keep separately. Beware - this approach requires a lot of maintenance, since
every new damap version has to be checked for new changesets you might want to include.
Also before version 3, all changesets where kept in db/changeLog.yaml. If you might want to remove certain changesets in
this file, you would have to create your own version in your institutional folder.
### Configuring Project and Person API
Provide your CRIS system and person database API addresses in the config:
Expand Down
21 changes: 21 additions & 0 deletions src/main/resources/db/damap/changeLog-root.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# To increase readability and make it more customizable, changes are going to be split into different files.
# As an id, consecutive integers are used.
# Each main version Y has its own folder named changeLog-Y.x (the x here is not to be substituted!!!).
# Inside are the changesets. Each changeset has its own file named changeLog-Y.x_1, where Y is the version of the current
# folder and x is the minor version the change belongs to. For example "changeLog-3.0.0_1.yaml". If two changes occur in the same
# minor version, use "changeLog-3.0.0_2.yaml" to distinguish between them.
# Please stick to these naming guidelines, to avoid conflicts.
#
# To include a new changeset, generate a new version folder (if not already there) and then create your changeset - follow
# the naming guidelines. Then append an include statement below, including your new changeset.
# Important - keep in mind the id - check which one your predecessor used.
#
# The commented out include statement below includes a sample changeset, to show how it should be done. If you are
# the first one to add a changeset using the new system - uncomment it and adapt it to your needs.
# Afterward please delete this comment-block.

databaseChangeLog:
- include:
file: db/changeLog.yaml # legacy changelog
#- include:
# file: db/damap/changeLog-3.x/changeLog-3.0.0_1.yaml

0 comments on commit cb38aa2

Please sign in to comment.