Kodi Community Forum

Full Version: SQL Upgrade
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dev,

Do you guys mind adding the possibility of upgrading existing databases when switching XBMC version.

I don't mind starting from scratch but I do mind having to add my libraries each time specially when the data already exists in the database.
This already happens. You should never have to start from scratch for SQLite (local) or MySQL. While we tell people to backup and make sure the MySQL server is set up correctly, all you really have to do is install the updated version of Kodi/XBMC and then open it. The software will upgrade the database and it should be all transparent to the user.
Is that new or it's always been like that? I always had to start from scratch. When looking at my databases I always see new databases for both videos and musics with different numbers at the end as well as the old one. Last week I deleted 6 databases total. I've had xbmc for 3 years now. 1 for each versions since.
Its always been like that.

It basically works like this (as an example):

Gotham clients used database versions: MyVideos78, MyMusic46.
Current Helix alpha5 use: MyVideos90, MyMusic48

So, suppose you wanted to upgrade ALL your Gotham clients to the current Helix Alpha, you would install Kodi over top of your existing client, fire the first client up and Kodi would then update your databases to MyVideos90 and MyMusic48 (Kodi may look like its frozen for a while upon first boot, because it takes some time updating the databases depending on how large your libraries are) , while not deleting/removing your Gotham MyVideos78 and MyMusic46 databases.

Now at this point, if you fire up a Gotham client, it would still talk to the old MyVideos78 and MyMusic46 databases, so any scraping or adding of movies etc would not be carried forward to the new Helix databases. Likewise if you fired up a Helix Alpha client, then it would only talk to the new MyVideos90 and MyMusic48 databases, and not add anything to the old databases.
If they're all using MySQL and are all using the same version, then it shouldn't be possible to be out of sync. They're not really syncing, but rather they're directly sharing the same database. What one box changes should be what all the other boxes see.

debug logs (wiki) will tell us more.