# HG changeset patch # User Sascha Wilde # Date 1568990300 -7200 # Node ID a3cbf5a2c1ef1845d7888b13b49b57213fed90d7 # Parent 5e62c467e145073114cb1f42aeeebced4621037b Clarify that db update scripts must not include regular schema files. diff -r 5e62c467e145 -r a3cbf5a2c1ef schema/updates/README.md --- a/schema/updates/README.md Fri Sep 20 13:52:19 2019 +0200 +++ b/schema/updates/README.md Fri Sep 20 16:38:20 2019 +0200 @@ -22,6 +22,10 @@ SELECT get_schema_version(); ``` +It is an design goal to allow any older version of a gemma data base +to be updated to the most current schema by calling `update-db.sh` +from the current gemma distribution. + ## Directory Layout the `schema/updates` directory contains subdirectories with names @@ -63,6 +67,13 @@ Note that all scripts in one version update are executed in a single transaction by the `update-db.sh` script. + **Important:** all sql scripts in one update directory have to be + self contained and *must not* include any files from the regular + schema definition (or from other update versions). This is + necessary to allow for updates over multiple versions of the schema, + where multiple updates might make incremental changes to the same + functions/files of the schema. + - Modify the scripts in `schema/` (outside the updates directory) to reflect the changes. The schema of a freshly created database using `schema/install-db.sh` must always be identical to the schema of a