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
.
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:
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:
null
value inside the column (update all null
values to non-nulls
).not
null
constraint.