MySQL Workbench auto increment disabled
MysqlMysql WorkbenchMysql Problem Overview
Mysql Solutions
Solution 1 - Mysql
Solution 2 - Mysql
As a work around, when you click the 'Apply' button and are presented with the generated script to review, you can actually edit that script. I ran into the issue you posted as well and just manually added AUTO_INCREMENT to the column definition I needed it applied to.
Solution 3 - Mysql
Just check the AI(Auto Increment) checkbox. No work around, that's why it's a workbench. Life made easy
Solution 4 - Mysql
You can do it this way
Halil Saltik
Solution 5 - Mysql
The field must be both datatype int and the primary key for the table.
Solution 6 - Mysql
If you are like me, and you are wondering how on earth to get to that primary-key, auto-increment checkbox etc:
- Hover over the table name, in my example "persons"
- A "spanner like icon" will appear
- Click on it and that's it!
I am using MySQL Workbench 8.0 CE(v8.0.19)
Solution 7 - Mysql
Make sure the datatype is INT, not character based.