vieten / sequel-pro

Automatically exported from code.google.com/p/sequel-pro
Other
0 stars 0 forks source link

Alter table (move row) issue with INT '' default (not null) #1140

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create table (leave default 'id' auto increment)
2. Make new column, type int, not null
3. Make another column, varchar size 200
4. Make another column same as in step 2
5. Try to move last column to before varchar

What is the expected output? What do you see instead?
I expect it to work. It used to work. 
Instead it complains about the default value.

I copied the query from the console and change this:
ALTER TABLE `mah_table` MODIFY COLUMN `my_other_id` INT(11) NOT NULL DEFAULT '' 
AFTER `id`;

To this:
ALTER TABLE `mah_table` MODIFY COLUMN `my_other_id` INT(11) NOT NULL AFTER `id`;

What version of Sequel Pro are you using? What version of MySQL are you
connecting to on the server?

Sequel Pro 0.9.9 Build 3348, MySQL (`mysql -V`) Distrib 5.1.41

Please provide any additional information below.
Used to work before update, I believe. 

Original issue reported on code.google.com by ryansull...@gmail.com on 4 Aug 2011 at 10:29

GoogleCodeExporter commented 9 years ago

Original comment by stuart02 on 9 Aug 2011 at 5:47

GoogleCodeExporter commented 9 years ago
Fixed in r3384.

Original comment by stuart02 on 9 Aug 2011 at 7:37