[mythtv-users] Migration question from 0.24 to 0.25

Michael T. Dean mtdean at thirdcontact.com
Mon May 21 22:58:13 UTC 2012


On 05/21/2012 06:45 PM, eric millham wrote:
> Mike, thanks for the reply.
> I started over again since I thought I basically did the above. turns out i
> did but missed the following error.
> Now I see the issue:
> May 21 16:35:05 htpc2 mythtv-setup[14525]: I CoreContext
> schemawizard.cpp:117 (Compare) Current MythTV Schema Version (DBSchemaVer):
> 1264
> May 21 16:35:09  mythtv-setup[14525]: last message repeated 4 times
> May 21 16:35:09 htpc2 mythtv-setup[14525]: C CoreContext
> schemawizard.cpp:179 (CompareAndWait) Timed out waiting.
> May 21 16:35:09 htpc2 mythtv-setup[14525]: C CoreContext dbutil.cpp:217
> (BackupDB) Database backups disabled.  Skipping backup.
> May 21 16:35:13 htpc2 mythtv-setup[14525]: C CoreContext dbcheck.cpp:495
> (UpgradeTVDatabaseSchema) Newest MythTV Schema Version : 1299
> May 21 16:35:13 htpc2 mythtv-setup[14525]: C CoreContext dbcheck.cpp:399
> (performActualUpdate) Upgrading to MythTV schema version 1265
> ....
> May 21 16:35:15 htpc2 mythtv-setup[14525]: C CoreContext dbcheck.cpp:399
> (performActualUpdate) Upgrading to MythTV schema version 1277
> May 21 16:35:15 htpc2 mythtv-setup[14525]: E CoreContext dbcheck.cpp:414
> (performActualUpdate) DB Error (Performing database upgrade): #012Query
> was:
>
> May 21 16:35:15 htpc2 mythtv-setup[14525]: E CoreContext dbcheck.cpp:509
> (UpgradeTVDatabaseSchema) Database Schema upgrade FAILED, unlocking.
>
> May 19 20:30:39 htpc2 mythtv-setup[4122]: E CoreContext dbcheck.cpp:414
> (performActualUpdate) DB Error (Performing database upgrade): Query was:
> INSERT INTO recordfilter (filterid, description, clause, newruledefault)
>    VALUES (0, 'New episode', 'program.previouslyshown = 0', 0); #012Error
> was: Driver error was [2/1062]:#012QMYSQL: Unable to execute
> query#012Database error was:#012Duplicate entry '0' for key 'PRIMARY'#012
> #012new version: 1277

That error is impossible when upgrading a proper 0.24-fixes database 
schema.  That indicates that you have a database that has a mix of both 
0.24 and 0.25 tables--i.e. you're improperly restoring your 0.24 
database on top of (not in place of) a 0.25 schema (likely one provided 
by your distro/package manager), which leaves the "didn't exist in 0.24, 
but are added for 0.25" tables in place, thus causing the failure you see.

Please restore the table properly--use the restore script which is 
designed to prevent this, and many other, common problems:

http://www.mythtv.org/wiki/Database_Backup_and_Restore#Replacing_an_existing_database


Mike


More information about the mythtv-users mailing list