Issue Bug Closed

#60514Database analyzer does not parse TEXT null / not null fields

Christian Kuhn 07/24/14, 12:08 updated 07/27/15, 08:13

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.