As a Developer I want to have a safe way to introduce unique constraints into our datamodel so that we can improve our integrity checks

Description

We have encountered several places where the database hasn’t ever checked for duplicates. This now leads us to issues when we would like to introduce unique constraints to fix things, where we do not know if the underlying data is correct or would cause issues.

Let's look into how we can safely resolve those issues. One option would be to check this during the installation and allow for the admin to fix the issues manually before re-running the upgrade.

 

Acceptance criteria:

  • A method for checking for database issues during upgrades is created

  • The method runs checks and aborts the upgrade with an error message if problems are detected

    • The error message contains information on what is wrong and what needs to be done to fix it, that the administrator can follow.

    • The check is run before the X-Road services are stopped so that the services remain running if even if the upgrade is aborted.

  • The upgrade does not leave the X-Road software in a broken state, even if it fails

  • After the problem is fixed, the upgrade can be continued

  • How to continue the upgrade is documented in the installation guide

Environment

None

Root cause (migrated)

None

Implementation notes

None

Activity

Show:
Done

Details

Assignee

Reporter

Target Version/s

Components

Sprint

Fix versions

Priority

Created August 21, 2023 at 7:35 AM
Updated September 15, 2023 at 5:39 AM
Resolved September 15, 2023 at 5:11 AM