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
Updated by Steffen Kamper almost 14 years ago
Issue title is irretating, this is a core issue as you already mentioned, it's t3lib_install.
Updated by Christian Futterlieb almost 14 years ago
Sorry, I was not sure about that. Thanks for correction ;)
Updated by Chris topher almost 14 years ago
Hi Christian,
please update the patch and post it on Core List!
For details check out http://typo3.org/teams/core/core-mailinglist-rules/
Updated by Alexander Opitz over 10 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0) - Is Regression set to No
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.1.7)?
IMHO this was fixed.
Updated by Alexander Opitz over 10 years ago
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this ticket.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
Updated by Christian Futterlieb over 10 years ago
The problem does not exist in the same way as it did before. Now it's fine, when the default value is properly specified (TYPO3 6.2.3):
myfield int(11) DEFAULT NULL,
I'm ok with closing the ticket, thanks for taking care