I also ran into this issue. It looks like at some point rows were created in the *_talk_participants table with duplicate room_id + user_id + session_id. Because of this, the creation of the desired index on the table fails. If you are able to run SQL statements in your database, try this to locate which rows are duplicates: SELECT count(*), user_id, room_id, session_id FROM oc_talk_participants GROUP BY user_id, room_id, session_id;
Anything with a number larger than 1 in the first column will break the update. AT YOUR OWN RISK - BACKUP THE DB FIRST, you will need to go in and run a SQL delete with a WHERE clause specifying the offending user_id/room_id/session_id combination with a LIMIT of 1 (assuming there were two duplicate rows). Then try the update again.
Had the same issue and did solve it but probably not the way you want. As the Talk upgrade seems wanting to create an index with fields making it to big a size, i went for the solution to somehow get past the upgrade fail and then delete Talk.
Having control over the database, i just logged in and created the index it complains about as a dummy index. Once this was done I logged into the docker container as www-data and did run the ‘occ app:update’ to let it finish whatever update it was doing. Once done, I could log into nextcloud again and there within I delete the Talk plugin.
Thanks for your help @dec0de,
I just found a solution, too and it worked out quite perfectly for my case, using mysql, Ubuntu 18 and Nextcloud 18.04.
Just follow those instructions:
Go to mysql and enrol as nextcloud sudo mysql -u root -p use nextcloud
type in following lines
CREATE TABLE oc_talk_participants_temp LIKE oc_talk_participants;
CREATE UNIQUE INDEX tp_ident ON oc_talk_participants_temp (room_id, user_id, session_id);
INSERT IGNORE INTO oc_talk_participants_temp SELECT * FROM oc_talk_participants;
DROP TABLE oc_talk_participants;
ALTER TABLE oc_talk_participants_temp RENAME TO oc_talk_participants;
Hello, in my case where I adopted the suggestion of encoding the database to utf8mb4_bin, I solved the problem by reducing the size of ‘user_id’ and ‘session_id’ which were both 255 long before creating the index. ALTER TABLE oc_talk_participants CHANGE user_iduser_id VARCHAR(127) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL; ALTER TABLE oc_talk_participants CHANGE session_idsession_id VARCHAR(127) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL;
And then I could go on the upgrade process.