v21 Nexus to Omega: Upgrade MyVideos database from 121 to 131 fails
#1
I updated my Ubuntu install of Kodi from Nexus v20 to Omega v21.0.0. The upgrade of the videodatabase from v121 to v131 fails with the following error:
Code:
2024-04-08 15:21:28.740 T:2455013   error <general>: SQL: [MyVideos131] Undefined MySQL error: Code (1062)
                                                   Query: INSERT INTO videoversion SELECT idFile, idMovie, 'movie', '0', '40400' FROM movie

I have a rather large video library, but that should not matter I would say. Debug log can be found here:
https://pastebin.com/y5GukrJr

Any ideas?
Reply
#2
Code 1062 means duplicate entry. There must be a duplicate somewhere in your movie table (multiple records with same idFile), blocking the migration.
You can start a new db from scratch, but can also locate and remove the duplicate with a mysql/mariadb frontend.
After removing the duplicate from the v121 db, delete the v131db and start Kodi v21 again.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
(2024-04-08, 16:33)CrystalP Wrote: Code 1062 means duplicate entry. There must be a duplicate somewhere in your movie table (multiple records with same idFile), blocking the migration.
You can start a new db from scratch, but can also locate and remove the duplicate with a mysql/mariadb frontend.
After removing the duplicate from the v121 db, delete the v131db and start Kodi v21 again.

Thanks a lot, I managed to fix it by removing the (indeed) duplicate idFile lines in the movie table of the v121 database.
Reply
#4
If someone else experiences this and has access to an SQL tool like HeidiSQL, I think if you run this query against the database and it returns results I think that might be a problem:

sql:
SELECT idFile, COUNT(*) AS "Count" FROM movie GROUP BY idFile HAVING COUNT(*) > 1 ORDER BY idFile;

scott s.
.
Reply
#5
Thanks for the tip - this solved the problem for me.  I had 3 sneaky duplicates in my database..
Reply
#6
I just did an upgrade to build 21 on the AndroidTV platform and got through the boot screen then froze on next screen.

I have 6 boxes sharing a MariaDB hosted on a QNAP NAS

Music DB had tried to update and failed.  

Instead of looking for duplicates as mentioned above I just went in and deleted the MyMusic 83 DB, as well as the previously working Mymusic 82 DB, as I could rebuild it easily.

Tried again and the upgrade was successful.
Reply

Logout Mark Read Team Forum Stats Members Help
Nexus to Omega: Upgrade MyVideos database from 121 to 131 fails0