[mythtv-users] Mythtv 0.22 upgrade problems

Nick Morrott knowledgejunkie at gmail.com
Wed Nov 11 00:56:32 UTC 2009


2009/11/8 Michael T. Dean <mtdean at thirdcontact.com>:
> On 11/07/2009 08:58 PM, mythtv a blandford wrote:
>>
>> I have been running mythtv for several years and am currently at 0.21.
>>
>> I am trying to upgrade to 0.22 using the atrpms packages.
>>
>> After the upgrade, running mythvsetup appears to go fine and I see the
>> schema updates occur.
>>
>> However, when I start the front end, it tries to update the schema for
>> mythvideo but fails.  On the screen it says:
>>
>> Warning: MythTV wants to upgrade your database for the Video schema, from
>> 1016 to 1028.
>>
>> Messages from the frontend log say:
>> Query was:
>> ALTER DATABASE mythconverg DEFAULT CHARACTER SET latin1;
>> Driver error was [2/1146]:
>> QMYSQL3: Unable to execute statement
>> Database error was:
>> Table 'mythconverg.videocountry' doesn't exist
>>
>> 2009-11-07 18:55:09.110 Couldn't upgrade video database schema, exiting.
>> 2009-11-07 18:55:09.110 Unable to initialize plugin 'mythvideo'.
>>
>> Looking at the database, that table does not appear to exist.
>>
>> Any suggestions on how to proceed?
>
> Backup your database (
> http://www.mythtv.org/wiki/Database_Backup_and_Restore ).
>
> Then:
>
> cat << "EOF" | mysql -umythtv -p mythconverg
> DROP TABLE IF EXISTS videocast;
> DROP TABLE IF EXISTS videocategory;
> DROP TABLE IF EXISTS videocountry;
> DROP TABLE IF EXISTS videogenre;
> DROP TABLE IF EXISTS videometadata;
> DROP TABLE IF EXISTS videometadatacast;
> DROP TABLE IF EXISTS videometadatacountry;
> DROP TABLE IF EXISTS videometadatagenre;
> DROP TABLE IF EXISTS videotypes;
> DROP TABLE IF EXISTS filemarkup;
> DROP TABLE IF EXISTS dvdinput;
> DROP TABLE IF EXISTS dvdtranscode;
> DELETE FROM settings WHERE value
>   IN ('mythvideo.DBSchemaVer',
>       'VideoDBSchemaVer',
>       'DVDDBSchemaVer');
> EOF
>
> Then start mythfrontend and it should re-create the video/DVD schema for
> you.
>
> I'm guessing at one point in the past you had only MythDVD or MythVideo
> installed back when they were separate plugins.

Is there a reason why a check for missing tables (and their creation
if found to be missing) was not the first schema update once MythVideo
and MythDVD were integrated. I'm sure Michael will not be the last
user to have used one or the other plugin exclusively in the past.

Is it possible to retrospectively alter the MythVideo schema for 1016
to "CREATE TABLE IF NOT EXISTS..." first, so that we check for any
missing tables and create them instead of having the upgrade fail?

Cheers,
Nick

-- 
Nick Morrott

MythTV Official wiki: http://mythtv.org/wiki/
MythTV users list archive: http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin Franklin


More information about the mythtv-users mailing list