Document Tree
Document Properties
Kbid
305E96
Last Modified
13-Jan-2023
Added to KB
31-Aug-2022
Public Access
Everyone
Status
Online
Doc Type
Guidelines
Product
ICM 7.10
Guide - 7.10.38.14 Fix NOT NULL Constraints

Introduction

Versions prior to 7.10.38.11 contained an issue that led to missing not null constraints on database tables belonging to persistent objects with fields that have been declared as required.

Fix NOT NULL Constraints

The fix is applied by the TablePreparer's migration part which is run on each database migration. It tries to apply the required flag as null/not null constraint. Normally this is not an issue, but in one exception:

The column needs to have the not null constraint applied, and a null value had been written into the column prior to this migration run.

If this is the case, a warning message using the following pattern is logged:

warning message
Skipping to change <tableName>.<columnName> from NULL to NOT NULL because there are NULL values present

If this message appears in the logs after the migration has been run, the migration of the column has to be done manually:

  1. Ensure that there is no null value inside the column (update all null values to non-nulls).
  2. Apply the not null constraint.
Disclaimer
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.