Kodi Community Forum
v21 Nexus to Omega: Upgrade MyVideos database from 121 to 131 fails - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: v21 Nexus to Omega: Upgrade MyVideos database from 121 to 131 fails (/showthread.php?tid=377008)



Nexus to Omega: Upgrade MyVideos database from 121 to 131 fails - mr_blond18 - 2024-04-08

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?


RE: Nexus to Omega: Upgrade MyVideos database from 121 to 131 fails - CrystalP - 2024-04-08

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.


RE: Nexus to Omega: Upgrade MyVideos database from 121 to 131 fails - mr_blond18 - 2024-04-09

(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.


RE: Nexus to Omega: Upgrade MyVideos database from 121 to 131 fails - scott967 - 2024-04-09

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.
.


RE: Nexus to Omega: Upgrade MyVideos database from 121 to 131 fails - Phoneymcringring - 2024-04-14

Thanks for the tip - this solved the problem for me.  I had 3 sneaky duplicates in my database..


RE: Nexus to Omega: Upgrade MyVideos database from 121 to 131 fails - craigh1960 - 2024-05-01

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.