Issue Bug Closed

#63713Check fields for NOT NULL by default in getDatabaseExtra()

Stephan Großberndt 12/09/14, 16:03 updated 10/19/17, 21:37

Description

The current default definition of getDatabaseExtra() in typo3/sysext/install/Classes/Service/SqlSchemaMigrationService.php is $ignoreNotNullWhenComparing = TRUE.

public function getDatabaseExtra($FDsrc, $FDcomp, $onlyTableList = '', $ignoreNotNullWhenComparing = TRUE) {

This means even if a definition in ext_tables.sql is

my_int_field int(10) unsigned NOT NULL DEFAULT '0',
my_varchar_field varchar(255) NOT NULL DEFAULT '',

TYPO3 currently does not force the field to be NOT NULL. If NOT NULL is in the field definition of a table in ext_tables.sql, TYPO3 should respect this and force the field to be NOT NULL by default.

If there are DBAL issues, check for installation of dbal and changing of $ignoreNotNullWhenComparing should be done in getDatabaseExtra()

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.