I’ve checked a database here that was upgraded to each point release in 1.8 and those keys are correctly defined there.
It looks to me as if a step was skipped in the 1.8.10 - 1.8.11 upgrade where those would be added. If you still have your backup, I would suggest rolling back to 1.8.10 and performing the upgrade again, ensuring that no steps are skipped over.
I have the error in all update installations and I have not seen any errors during the update.
All custom installations !
DROP TABLE IF EXISTS permission;
/ *! 40101 SET @saved_cs_client = @@ character_set_client * /;
/ *! 40101 SET character_set_client = utf8 * /;
CREATE TABLE permission ( permissionId int (11) NOT NULL AUTO_INCREMENT, entityId int (11) NOT NULL, groupId int (11) NOT NULL, objectId int (11) NOT NULL, view tinyint (4) NOT NULL, edit tinyint (4) NOT NULL, delete tinyint (4) NOT NULL,
PRIMARY KEY (permissionId),
KEY permission_ibfk_1 (groupId),
KEY permission_ibfk_2 (entityId),
KEY permission_objectId_index (objectId),
CONSTRAINT permission_ibfk_1 FOREIGN KEY (groupId) REFERENCES group (groupID),
CONSTRAINT permission_ibfk_2 FOREIGN KEY (entityId) REFERENCES permissionentity (entityId)
) ENGINE = InnoDB AUTO_INCREMENT = 71 DEFAULT CHARSET = utf8;
/ *! 40101 SET character_set_client = @saved_cs_client * /;
Another example of update order:
Xibo-cms-1.8.1
Xibo-cms-1.8.2
Xibo-cms-1.8.3
Xibo-cms-1.8.4
Xibo-cms-1.8.5
Xibo-cms-1.8.9
Xibo-cms-1.8.10
Xibo-cms-1.8.11