Bug #49564 Default value (NULL) not updated when changed from NULL to NOT NULL column
Submitted: 9 Dec 2009 14:51 Modified: 10 Dec 2009 15:02
Reporter: Nidhi Shrotriya Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.10 OS:Linux (ubuntu 9.04)
Assigned to: CPU Architecture:Any

[9 Dec 2009 14:51] Nidhi Shrotriya
Description:
Installed workbench 5.2.10 from
http://dev.mysql.com/downloads/select.php?id=8 on Ubuntu 9.04.

Launched mysql-workbench.

Home -> Open existing model (created using SQL script) sets the default column value to NULL. 
Now update column to be NN by clicking the box. The default still shows NULL ?

Save the model -> Forward engineer ->
Executing SQL script in server
ERROR: Error 1067: Invalid default value for 'ssn'

CREATE  TABLE IF NOT EXISTS `db1`.`Works_In` (
  `ssn` CHAR(11) NOT NULL DEFAULT NULL ,

Because NOT NULL column having default value NULL.

How to repeat:
As mentioned in the description.
[9 Dec 2009 16:27] MySQL Verification Team
Thank you for the bug report.
[10 Dec 2009 15:02] Johannes Taxacher
this is not a bug because validations (or sanity checks) like that are not provided for OSS version.
SE version shows a waning about that when running validation - but these validation checks are exclusive features of SE edition.