Bug #80209 Table editor: Please provide data type editor (datatype column)
Submitted: 31 Jan 2016 19:25 Modified: 2 Feb 2018 14:14
Reporter: Filipus Klutiero Email Updates:
Status: Verified Impact on me:
Category:MySQL Workbench Severity:S4 (Feature request)
Version:6.3.6, 6.3.10 OS:Any
Assigned to: CPU Architecture:Any

[31 Jan 2016 19:25] Filipus Klutiero
MySQL table columns can have several data types, such as INT. But the choice is more complicated, since most can have parameters, to control precision or maximum length, for example.

When trying to add a TIMESTAMP column, I was hit by bug #80204. Miguel Solorzano pointed out that the error obtained was not really a bug. There is no guarantee that just selecting one of the options from the dropdown will work, and indeed, it does not for many (if not most) options. The bottom line is that the current interface is far from user-friendly.

Instead of a field mixing a dropdown and a freeform input, I would recommend having a dropdown or even more evolved selectors, and setting precision or maximum length in a different field. This is what phpMyAdmin does, although it is still imperfect. phpMyAdmin allows filling its Size/Values field even for types such as TINYBLOB, where the type itself determines the maximum size. Workbench should indicate what parameters can or need to be provided depending on the base type chosen. This would avoid the need to provide 2 options for types where no complementing integer is required (such as INT).

For most parameters, a field containing an integer is sufficient to complete the specification. But as reported in bug #43000, in the case of ENUM, this could be problematic. For ENUM, it should be possible to fill any number of text fields.

Ideally, when choosing the base type, there would be information to help choosing, such as tooltips or links to the manual. This is why radio boxes or something more advanced may be warranted.

How to repeat:
N/A (but see ticket #80204 for one scenario caused by the current design)

Suggested fix:
Since the proposal needs lots of space, I suggest turning the dropdown in the table into a read-only field which opens a dialog when clicked. Or which bring the focus below the columns table, in the Data type section.
[2 Feb 2018 14:14] MySQL Verification Team
Hello Filipus Klutiero,

Thank you for the feature request!