Closed lukekalish closed 6 months ago
Thank you - investigating this for the next build.
If you get the chance, could you try https://sqlprostudio.s3.us-east-1.amazonaws.com/mysql/SQLProMySQL.2024.16.app.zip? That should sort this out.
Going to mark this as closed. If you continue to have any issues with it, please let me know.
Describe the bug You have a pre-existing MySQL table with an id column that is an int and not auto incrementing or a primary key. You alter the table to make the id column auto-incrementing and a primary key; the SQL produced is two statements. The first is altering the column to be auto-incrementing, and the second statement is to make the column the primary key. But MySQL will throw an exception on the first statement, stating that an auto-incrementing column must also be a primary key. This should be a single alter statement that adds the auto-incrementing and the primary key.
To Reproduce Steps to reproduce the behavior:
Expected behavior Instead of two separate statements, there should be a single alter statement to make the column auto-increment and the primary key. This single statement does not result in an error.
Example:
ALTER TABLE test_table MODIFY test_id int AUTO_INCREMENT NOT NULL PRIMARY KEY;
Screenshots
Environment details (please complete the following information):
Additional context N/A