From 84f0180ad1ae38034f16a55bb50794d097530c2f Mon Sep 17 00:00:00 2001 From: Stefan Klotz <35995139+StefanKlt@users.noreply.github.com> Date: Wed, 10 Feb 2021 17:06:50 +0100 Subject: [PATCH] Document and explain DB migration issue (#1079) * add explanation Signed-off-by: Stefan Klotz * add hyperlinks Signed-off-by: Stefan Klotz * rephrase Signed-off-by: Stefan Klotz * rephrase Signed-off-by: Stefan Klotz --- MIGRATION.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/MIGRATION.md b/MIGRATION.md index 26ce2f028..903edc1b7 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,3 +1,4 @@ + # hawkBit Migration Guides ## Release 0.2 ### Configuration Property changes @@ -22,3 +23,19 @@ ## Milestone 0.3.0M6 ### Configuration Property changes - hawkbit.server.security.dos.maxTargetsPerManualAssignment has changed to hawkbit.server.security.dos.maxTargetDistributionSetAssignmentsPerManualAssignment + +## Upgrade from Master Branch (after 0.3.0M6) to 0.3.0M7 +Due to changes in the DB migration scripts within PR [#1017](https://github.com/eclipse/hawkbit/pull/1017) the Hawkbit will not start up if one of the following cases is true: +- DB2 database is used +- MSSQL database is used and the sp_action table is not empty +- PostgreSql database is used and the sp_action table is not empty + +The script was fixed with PR [#1061](https://github.com/eclipse/hawkbit/pull/1061). + +In case you upgrade from 0.3.0M6 to 0.3.0M7 there is no issue. But if you have built the Hawkbit from the master branch between PR [#1017](https://github.com/eclipse/hawkbit/pull/1017) and PR [#1061](https://github.com/eclipse/hawkbit/pull/1061), use PostgreSQL or MSSQL and upgrade to 0.3.0M7, it will fail at startup with the message: `Validate failed: Migration checksum mismatch for migration version 1.12.16` + +This can be fixed by adapting the schema_version table of the database. The checksum field of the entry with the version 1.12.16 has to be changed (mind the minus): +- -1684307461 for MSSQL +- -596342656 for PostgreSql + +Example for MSSQL: `UPDATE schema_version SET checksum=-1684307461 WHERE version='1.12.16'`