Kodi Community Forum
v21 MySQL db can't update from v124 -> v129 - 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 MySQL db can't update from v124 -> v129 (/showthread.php?tid=375938)



MySQL db can't update from v124 -> v129 - beeswax - 2024-01-21

I just tried to update to latest nightly (KodiSetup-20240120-98685178-master-x64.exe on Windows or kodi-20240120-98685178-master-arm64-v8a.apk on Android) but both are failing to update the MySQL db and leaving me with a corrupt database with no media.  I started working my way back through nightlies, dropping the myvideos129 db after each attempt, but after getting back to Jan 7th and still having the same problem, I've given up and rolled back to Beta2.  Can someone take a look at the db upgrade script?

php:
2024-01-21 20:13:50.427 T:15484    info <general>: Attempting to update the database MyVideos129 from version 124 to 129
2024-01-21 20:13:50.427 T:15484   debug <general>: Mysql Start transaction
2024-01-21 20:13:50.850 T:15484   debug <general>: Mysql commit transaction
2024-01-21 20:13:50.854 T:15484   debug <general>: Mysql Start transaction
2024-01-21 20:13:50.854 T:15484   debug <general>: Mysql execute: ALTER TABLE videoversiontype ADD itemType INTEGER
2024-01-21 20:13:50.926 T:15484   debug <general>: Mysql execute: UPDATE videoversiontype SET itemType = 0
2024-01-21 20:13:50.931 T:15484   debug <general>: Mysql execute: ALTER TABLE videoversion RENAME COLUMN mediaType TO media_type
2024-01-21 20:13:50.931 T:15484   error <general>: SQL: [MyVideos129] Undefined MySQL error: Code (1064)
                                                   Query: ALTER TABLE videoversion RENAME COLUMN mediaType TO media_type
                                                   
2024-01-21 20:13:50.931 T:15484   error <general>: Exception updating database MyVideos129 from version 124 to 129
2024-01-21 20:13:50.931 T:15484   error <general>: Error updating database MyVideos129 from version 124 to 129

Here's a full debug log from the 7th Jan version, currently nightly does exactly the same.

edit: if it helps at all, I can see from MySQL that my recent sql db version history is 121 -> 122 -> 124 and now I'm stuck.


RE: MySQL db can't update from v124 -> v129 - CrystalP - 2024-01-22

A fix went in today, the next nightly will complete the database upgrade successfully.


RE: MySQL db can't update from v124 -> v129 - beeswax - 2024-01-22

Nice! That sounds like it was already a known problem before I reported it. Classic me picking the day before a complete db break gets fixed to update!