adminer - how to create composite primary key

1k Views Asked by At

I am trying to create a db schema using adminer php tool. For a particular table I have to create a composite primary key consisting of two fields viz., template_id and version. I don't seem to find a way to do this using adminer. When I select Primay for two indexes, I get an error message indicating 'mutliple primary keys defined'.

enter image description here

Is there a way to create a composite primary key using this tool?

1

There are 1 best solutions below

0
On

Selecting the drop down menu to the right of the "template_id" drop down menu, and selecting "revision" in that menu should create a composite primary key for those two fields.The resulting sql command should contain something that looks like this:

PRIMARY KEY `<name_of_index>` (`template_id`,`revision`)