Description:
In the 'Workbench Prefereces' dialog (accessed via 'Edit | Preferences'), 'Model' tab, there is a group of options called 'Column Defaults'.
In this option group, the two inputs 'PK Type' and 'Column Type' do not allow flags to be specified. For example, 'UNSIGNED', 'NOT NULL' and 'AUTO_INCREMENT'.
This is very annoying as the PK column in particular (and most regular columns) should nearly always, if they are of a numeric type, be 'UNSIGNED'.
The PK column should additionally nearly always be 'NOT NULL' and, if it's a numeric type, 'AUTO_INCREMENT'.
Not allowing this to be set as a default is a serious pain for the user, requiring much useless labour every time a table is created. In complex schemas, this wastes a lot of time and detracts significantly from the user experience.
How to repeat:
In the 'Workbench Prefereces' dialog (accessed via 'Edit | Preferences'), 'Model' tab, there is a group of options called 'Column Defaults'.
In this option group, the two inputs 'PK Type' and 'Column Type' do not allow flags to be specified. For example, 'UNSIGNED', 'NOT NULL' and 'AUTO_INCREMENT'.
If 'INT UNSIGNED AUTO_INCREMENT' is entered as the type for PK, then you create a column, these flags are not set properly. Additionally, the column type remains unset due to lack of input validation (back on the inputs themselves).
Suggested fix:
- upgrade the 'PK Type' and 'Column Type' inputs to be validating drop-downs with a set of flag fields, using the same UI code as the column type in the table editor on the 'model view'
- while you're at it, maybe renaming them 'Default PK Type' and 'Default Column Type' would be a good extra change)
- while you're at it, maybe adding mouseover explanations to the flags would be a good UI improvement, as the two-letter abbreviations are not entirely clear to first time MySQL Workbench users who - let's face it - may have limited MySQL or SQL experience