Bug #63713

Check fields for NOT NULL by default in getDatabaseExtra()

Added by Stephan Großberndt 8 months ago. Updated 5 months ago.

Status:Resolved Start date:2014-12-09
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:Install Tool Spent time: -
Target version:7.4 (Backend)
TYPO3 Version:7 Is Regression:No
PHP Version: Sprint Focus:
Complexity:

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()


Related issues

duplicates Core - Bug #64616: Compare Database does not remove 'NOT NULL' Resolved 2015-01-29

History

#1 Updated by Mathias Schreiber 7 months ago

  • Target version changed from next-patchlevel to 7.4 (Backend)

#2 Updated by Stephan Großberndt 5 months ago

  • Status changed from New to Resolved

Also available in: Atom PDF