Liquibase: conflicting manual changes to schema
We have users that have manually updated the database schema and sometimes populated new columns (e.g. accessionNumber
).
Attached are scripts that create the schema of the database at one of the partners. Please note that the script works with gringlobal_nodata
database and needs updating for local use!
GGCE should be tolerant to such cases and should not fail if columns (or constraints) already exist.
Options
Option 1: When the user does manual changes to the database, they should flag that the change has already been executed in DATABASECHANGELOG
. The problem here is to know what change ID
, hash values, etc. they should insert to the database.
Option 2: Update changeLog.yml
to always use preconditions (to check if columns/constraints already exist) and use MARK_RAN
.
What now?
Option 1 seems to be the safer option as it requires that the user correctly executes the manual upgrade + marks it in DATABASECHANGELOG
.
Option 2 would be useful, but unfortunately requires a lot of updating of liquibase-changeLog.yml
.