Bug #60514
Database analyzer does not parse TEXT null / not null fields
Status: | Closed | Start date: | 2014-07-24 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Morton Jonuschat | % Done: | 0% |
|
Category: | Database API | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 6.2 | Is Regression: | No | |
PHP Version: | Sprint Focus: | |||
Complexity: |
Description
Suppose you have a column defined as TEXT in a table, it will be implicit NULL.
CREATE TABLE fe_groups (
description text
);
If this column exists and the definition is later changed to "NOT NULL", the database analyzer does not recognize this change and thinks everything is fine.
CREATE TABLE fe_groups (
description text NOT NULL,
);
The db analyzer code should issue this command:
ALTER TABLE `fe_groups` CHANGE `description` `description` TEXT NOT NULL;
The same issue exists vice versa: If a field in NOT NULL and is changed to allow NULL as default.
Related issues
History
#1 Updated by Morton Jonuschat 14 days ago
- Assigned To set to Morton Jonuschat
#2 Updated by Morton Jonuschat 14 days ago
- Status changed from New to Needs Feedback
I just tried to validate this on 6.2.14 and couldn't reproduce with a clean table. Switching between NOT NULL and NULL works flawlessly.
The examples given in the ticket have one problem, the field type is written in uppercase (TEXT) instead of lowercase (text).
This leads to upgrade suggestions in the install tool that can not be implemented and will always show up.
#3 Updated by Morton Jonuschat 8 days ago
- Status changed from Needs Feedback to Closed
This bug has been fixed through issue #64616