Database Versions
#1
Where can one look to find out what database version is used by the various nightly builds?

Why? I have three instances of XBMC running on three different platforms with a shared media database. If I move to the latest nightly build on my ATV1, am I also going to have to move to the latest nightly on my ATV2 in order to maintain database harmony?
Reply
#2
Buadhai Wrote:Where can one look to find out what database version is used by the various nightly builds?

Apparently the answer is: Nowhere.

How then do those of you who run XBMC nightly releases on more than one platform deal with the database version issue? Do you always update every machine simultaneously to the same release?

Or, have I asked a question that troubles no one but me?
Reply
#3
I suppose you use mysql? If not, the db versions dosen't matter all libraries will be uniqe.

For my MySQL soulution I try to update all my xbmc instances to simmilar build dates. This mostly works.
Reply
#4
^Thanks.

Yes, I use a shared MySQL database. I got burned once before by differing database versions and ended up having to start over from square one. I want to avoid that.

I was hoping that there would be an easy way to determine if the database version of the latest nightly build for Mac/ATV1 was the same as the build I'm running on my AppleTV 2, which is several months old. (Upgrading the Mac version on an ATV1 is a GUI snap. Upgrading the ATV2 involves some tedious command line work.)
Reply
#5
I imagine there must be an easier way, but if you look at the VideoDatabase.cpp file on github, there is a method that performs an update of the databases. look for the last if (iVersion < 55) type line and that'll give you a clue as to what database version the latest nightly uses. You'd want all your xbmc clients to use the same databse version I'd imagine
Reply
#6
Once Eden is out. Just update all machines to Eden and your worries will be gone. I know its hard to stay on stable when all goodies are merged in after a release. But really its the best way to avoid db version issues.
Reply
#7
The VideoDatabase.cpp file is here:

VideoDatabase.cpp

As of today the version checking starts out at about line 3350.

That does let you know what the current version is, but it doesn't tell you what database version your instance(s) of XBMC are running.
Reply
#8
Jaken Wrote:Once Eden is out. Just update all machines to Eden and your worries will be gone. I know its hard to stay on stable when all goodies are merged in after a release. But really its the best way to avoid db version issues.

Well, the reason I'm interested is that the version of XBMC running on my AppleTV1 has developed a script problem (the Next Aired script). The script itself is up-to-date. I thought that my old nightly might be the source of the error: not compatible with the latest Next Aired script.
Reply
#9
New nightlies copy the MySQL DB and upgrade the copy. Your original MySQL DBs will always be safe if the update fails.
Reply
#10
Ned Scott Wrote:New nightlies copy the MySQL DB and upgrade the copy. Your original MySQL DBs will always be safe if the update fails.

Of course. But it would be so nice to know in advance if the new nightly was compatible with the old DB.
Reply
#11
Buadhai Wrote:The VideoDatabase.cpp file is here:

VideoDatabase.cpp

As of today the version checking starts out at about line 3350.

That does let you know what the current version is, but it doesn't tell you what database version your instance(s) of XBMC are running.
You need to look at VideoDatabase.h to get the version. Search for "GetMinVersion" (it's near the bottom). The version number is the return value. Similarly, MusicDatabase.h for music.
Reply
#12
scudlee Wrote:You need to look at VideoDatabase.h to get the version. Search for "GetMinVersion" (it's near the bottom). The version number is the return value. Similarly, MusicDatabase.h for music.

So, that tells me what DB version is "current". How do I find out what versions my installations are using?
Reply
#13
If you change your advancedsettings.xml file and take out the MySQL part of it, you'll force your old XBMC versions to build a local SQLlite db called myvideosXY, where XY is the databse version.

Not sure how this knowledge will be much use to you, as even knowing the version the old xbmc uses, you'll still need to study videodatabase.cpp to see what changes it implements to bring the database up to date and see whether these changes would likely cause you issues or possible corruption when running an old xbmc.
Reply
#14
mikeybhoy Wrote:If you change your advancedsettings.xml file and take out the MySQL part of it, you'll force your old XBMC versions to build a local SQLlite db called myvideosXY, where XY is the databse version.

Right. That would certainly do the trick. Seems like a lot of trouble to have to rebuild the entire database just to determine what version you're running....

There must be an easier way.

(Yours in work-avoidance.)
Reply
#15
If you're using mysql, you could always open up the mysql prompt and type
Code:
mysql> show databases;
The databases with the higher numbers will be the ones you're using.
Reply

Logout Mark Read Team Forum Stats Members Help
Database Versions1