alter table

(MySQL)

There doesn't appear to be an easy way to add a new index by selecting from existing columns? (in the indices tab)

You have to manually type the field name.

I haven't tried it yet but it looks like I could go to the columns tab, check unique index, then edit the resulting script

and execute the script...

Non starter, I edited the script to remove unique, click execute, the dialog goes away.

Reopen the table for modifying and the new index is there and unique. So editing the script is possible but does nothing - if it's read only, it shouldn't be editable.

So in summary, there's no way to pick a column to create a non-unique index. It might seem minor to have to type the field in but other tools do this better.

7 comments
Comment actions Permalink

Auto-completion should work there for the existing table columns:
Screen Shot 2016-01-14 at 18.22.23.png

Doesn't it work for you?

0
Comment actions Permalink

Hi Andrey

At the time I posted, I hadn't seen the column picker appear at all when trying to add an index (even if I press a letter one of the columns contains)

So I went to do a screen capture video and I saw the picker!

So I stopped and restarted modify table and there was no picker.

Now I can sometimes make it appear but in a table with no pre-existing indexes, the first index I try to add, won't bring up the picker.

If I try to add a second index, the picker will appear but only after I press at least one character.

I tried it on a table with existing indexes and it made no difference, the picker wouldn't appear easily.

One more thing I noticed - when the picker is not showing, the text I type is highlighted until I type the whole name of the field and then the highlight disappears, indicating it is recognising the field names.

Should the picker appear instantly without even having to press a character?

0
Comment actions Permalink

>Now I can sometimes make it appear but in a table with no pre-existing indexes, the first index I try to add, won't bring up the picker.

Can you attach a screenshots of this?

>Should the picker appear instantly without even having to press a character?

If I understand you correctly the columns selector appears when you click on a index definition in that dialog or + button if no indices are yet exist:







 

0
Comment actions Permalink

Hi. It is easiest to demonstrate with short video:

http://screencast.com/t/zxxyCmUss60

Here you'll see that I pick a table with two columns that start 'de...' (default and description)

When I first start to type, the name picker doesn't appear.

A short while later in the video )(after I type description and then delete again), it does appear.

And it may be just random chance but it seems to work more reliably in the 64 bit version. I expect you'll say that shouldn't make any difference so it probably just was luck.

 

 

0
Comment actions Permalink

Thanks. Does it help to explicitly press Ctrl+Space for completion to popup?

0
Comment actions Permalink

Yes it does - even when id (the default) is already in the edit box, the whole list appears - thank you for that temporary work around :-)

0
Comment actions Permalink

Thanks, created the https://youtrack.jetbrains.com/issue/DBE-2167 for this issue, please follow for updates.

0

Please sign in to leave a comment.