[mythtv-users] import an old sql DB into the new format on exisiting 0.19 install

Tom Lichti tom at redpepperracing.com
Sat Feb 18 00:47:26 UTC 2006


Raphael Pooser wrote:
> My question is, could it be possible to get an old database from say 
> 0.17 or 0.18 version into the 0.19 DB after upgrading?  I went ahead and 
> installed 0.19 from scratch on a new system, so I have my backup from my 
> old mythconverg db, but since the install was new, there was no 
> preexisting mythconverg db when I installed 0.19.  So, is it possible to 
> get the program info from my old db into the new one.  
Well, what you could do is look at what the DB schema version is on the 
old database (select * from settings where value = 'DBSchemaVer') and 
compare that to the latest version (mine is 1124) and then look in the 
source file mythtv/libs/libmythtv/dbcheck.cpp and go to the function 
doUpgradeTVDatabaseSchema and find the first version that is newer than 
what you have, and then run all the commands manually until you are up 
to the latest version. Tedious. The other thing you could do, since you 
don't have any data in the db yet (I assume) is make the .19 setup point 
at the old DB, and it should upgrade it to the current schema. Don't do 
this on your only copy, and I make no guarantees as to the accuracy of 
this advice. :)
> Or perhaps I should uninstall myth, drop the mythconverg db, restore my backup db 
> into sql and then reinstall 0.19...?  Then when I reinstall mythtv it 
> should find my old mythconverg db already existing an upgrade it to the 
> new format.  If that's the best route to I'll do that.
Sort of what I said above, and should work, except you don't have to 
uninstall/reinstall in my version.

Tom


More information about the mythtv-users mailing list