Bug #42883 data type serial is missing
Submitted: 16 Feb 2009 14:18 Modified: 28 Oct 2009 8:54
Reporter: Susanne Ebrecht Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.1.7 OS:Any
Assigned to: CPU Architecture:Any
Triage: Needs Triage: D5 (Feature request) / R4 (High) / E5 (Major)

[16 Feb 2009 14:18] Susanne Ebrecht
Description:
CREATE TABLE t(i serial);

This is not possible in Workbench.

Data type SERIAL is missing. When you try to add data type SERIAL system will make column as VARCHAR(45) by automatism.

How to repeat:
Draw a table. Edit Columns.

Add an integer column without PK.
Add a second column and try to give it data type SERIAL

Suggested fix:
Add datatype serial with background magic like it is done in CLI
[28 Oct 2009 8:54] Susanne Ebrecht
We discussed this in triage team.
We think the best solution here would be a pre defined user type named SERIAL with all conditions that the data type includes.

Means bigint(20) unsigned unique not null auto_increment.

We know this is tricky and a high efford/risk.

Anyway, SERIAL is used very often from our users and so we think it is necessary to implement this.
[28 Oct 2009 9:13] Susanne Ebrecht
The implementation of this could be related to the fix of bug #48366.
[10 Aug 2010 21:23] Jack Ostroff
According to the mysql manual, "SERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE."  It would be great if workbench could just put "serial" into the create table statement, but then it wouldn't know about the other attributes of the column.  However, I'm not sure why implementing this would be high risk.

Would it be reasonable to expand this feature request to handle all standard aliases of this sort that mysql defines for standard data types?