Mercurial > gemma
changeset 4452:a3cbf5a2c1ef
Clarify that db update scripts must not include regular schema files.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Fri, 20 Sep 2019 16:38:20 +0200 |
parents | 5e62c467e145 |
children | 9b9f60e26b39 |
files | schema/updates/README.md |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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