Document Tree
Document Properties
Last Modified
Added to KB
Public Access
Doc Type
ICM 7.10
Guide - Fix NOT NULL Constraints


Versions prior to 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.
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.
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 if you experience login issues,
or if you want to register as customer.