Bug #24472
closedInstall complains about default values in ext_tables.sql
0%
Description
When a field with a datatype which is not blob or text has NULL as default value, the extension manager ( or install tool db compare) treats the default value as ''.
For example:
ext_tables.sql:
CREATE TABLE category (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
parent_category_uid int(11),
name varchar(255) DEFAULT '' NOT NULL,
FOREIGN KEY (parent_category_uid) REFERENCES category(uid) ON DELETE CASCADE,
PRIMARY KEY (uid),
KEY parent (pid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DESCRIBE category:
Field | Type | Null | Key | Default | Extra
..
parent_category_uid | int(11) | YES | MUL | NULL |
..
Back in extension manager:
ALTER TABLE category CHANGE parent_category_uid parent_category_uid int(11);
Current value: int(11) default ''
Attached patch prevents generating [default ''] on fields which have NULL as default value.
Tested and working (only) on my sytem:
Ubuntu 10.10
PHP 5.3.3
Apache 2.2.16
MySQL 5.1.49
TYPO3 4.4.6
I don't know if there raise any unwished influences (dbal?).
(issue imported from #M16912)
Files