Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit an exiting row and setting auto increment should prompt to add index #13235

Open
ibennetch opened this Issue May 3, 2017 · 9 comments

Comments

Projects
None yet
5 participants
@ibennetch
Copy link
Member

ibennetch commented May 3, 2017

Steps to reproduce

  1. Create a table containing an INT column
  2. Edit the column by going to Structure then Change
  3. Click the "A_I" checkbox

Expected behaviour

The dialog to add an index should appear

Actual behaviour

The dialog is not shown and when submitting the form I get the error

#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key

Server configuration

Demo server running 'master'

Client configuration

Browser:
Firefox
Operating system:
Mac OS

@nijel nijel added the enhancement label May 4, 2017

@OlafvdSpek

This comment has been minimized.

Copy link

OlafvdSpek commented May 11, 2017

Should it prompt or should it just do it (when the request is submitted, not when the box is ticked)?

@ibennetch

This comment has been minimized.

Copy link
Member Author

ibennetch commented May 11, 2017

@OlafvdSpek

This comment has been minimized.

Copy link

OlafvdSpek commented May 11, 2017

I don't like the popup in the other cases either.

@shucon

This comment has been minimized.

Copy link
Contributor

shucon commented Mar 25, 2018

I'm starting to work on this.

@ibennetch

This comment has been minimized.

Copy link
Member Author

ibennetch commented Mar 26, 2018

I would support Olaf's idea of not popping up the extended index interface here. A user wishing to add the extended attributes could do so from the table's structure page in the Index area. The popup after checking "A_I" is only annoying for me because I've never used any of the options contained in it.

@nulll-pointer

This comment has been minimized.

Copy link
Contributor

nulll-pointer commented Jun 12, 2018

But shouldn't the user be given the option to choose if they want to make it a key or an index without a key??

@OlafvdSpek

This comment has been minimized.

Copy link

OlafvdSpek commented Jun 12, 2018

There's no difference in MySQL AFAIK.

@nulll-pointer

This comment has been minimized.

Copy link
Contributor

nulll-pointer commented Jun 16, 2018

@OlafvdSpek, hello, I'm currently working on this.
As of now, Isaac and I have decided to not show the popup and add index automatically.
My idea is to create an index named A_I_columnName if it doesn't exist and leave it if user removes A_I on that column, If user chooses to add the A_I on that column again, we'll use that index if it exists and create it if it doesn't.
Have some suggestions??

@OlafvdSpek

This comment has been minimized.

Copy link

OlafvdSpek commented Jun 16, 2018

Yes, use primary key instead of A_I_columnName.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.