Project

General

Profile

Actions

Bug #24472

closed

Install complains about default values in ext_tables.sql

Added by Christian Futterlieb almost 14 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-01-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

16912.diff (1.28 KB) 16912.diff Administrator Admin, 2011-01-04 15:07
16912-v2.diff (670 Bytes) 16912-v2.diff Administrator Admin, 2011-02-11 10:34
Actions

Also available in: Atom PDF