Table without unique column in phpMyAdmin

Here is my table:

CREATE TABLE group_edits (
  vfile_id bigint(20) unsigned NOT NULL,
  editor_id int(10) unsigned NOT NULL,
  edits text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

There is no unique index, as one editor_editor can edit several vfile_ids, and one vfile_id file can be edited by several editors.

phpMyAdmin 4.1.6 does not allow me to edit this table, saying:

Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available.

Now it seems to me that something is wrong with the table? Rows are unique when you take the value of editor_id AND vfile_id, while none of the columns are unique.

I know that for correction I could add

`ID` int(11) NOT NULL AUTO_INCREMENT,

but it does not reflect the design of my database schema, and I would like to avoid adding tricks to get phpMyAdmin to work.

Is my database design wrong or is it phpMyAdmin?

+4
1

, (editor_id, vfile_id), .

 ALTER TABLE group_edits ADD PRIMARY KEY (editor_id, vfile_id)

phpmyadmin, , , .

phpmyadmin .

+5

Source: https://habr.com/ru/post/1525446/


All Articles