[mythtv-users] (no subject)

Bruce Markey bjm at lvcm.com
Thu May 27 06:20:45 EDT 2004


Jeff "Muddy" Waters wrote:
> Ok, I screwed up somehow.
> 
> ######################################
> $ mythfrontend
> 2004-05-27 03:28:49 Upgrading to schema version 1042
> DB Error (Performing database upgrade):
> Query was:
> ALTER TABLE record ADD seriesid varchar(12) NULL;
> Driver error was [2/-1]:
> QMYSQL3: Unable to execute query
> Database error was:
> Duplicate column name 'seriesid'
> #####################################
> 
> I was trying to run my frontend for the first time on my mandy 9.2 box
> and it started with that :
> 
> 2004-05-27 03:25:36 Upgrading to schema version 1008
> 2004-05-27 03:25:36 Upgrading to schema version 1009
> 2004-05-27 03:25:36 Upgrading to schema version 1010
> 2004-05-27 03:25:36 Upgrading to schema version 1011
> 
> Stuff so I stopped it, well It seems to have broken something in the
> database. Any ideas short of wiping out the database and starting over?
> I have to wake up in 4 hours, sigh... so I'll have to sleep on this for
> now.

Should be easy.

First, backup your database in it's current state to give
yourself the best chance of recovering the info for your
recordings if thing go from bad to worse:

http://www.mythtv.org/docs/mythtv-HOWTO-21.html#ss21.5

Next, run your mysql client:

mysql -u mythtv -pmythtv mythconverg

then cut'n'paste all of the following lines:

ALTER TABLE record ADD seriesid varchar(12) NULL;
ALTER TABLE record ADD programid varchar(12) NULL;
ALTER TABLE recorded ADD seriesid varchar(12) NULL;
ALTER TABLE recorded ADD programid varchar(12) NULL;
ALTER TABLE oldrecorded ADD seriesid varchar(12) NULL;
ALTER TABLE oldrecorded ADD programid varchar(12) NULL;
ALTER TABLE program ADD INDEX (seriesid);
ALTER TABLE program ADD INDEX (programid);
ALTER TABLE record ADD INDEX (seriesid);
ALTER TABLE record ADD INDEX (programid);
ALTER TABLE recorded ADD INDEX (seriesid);
ALTER TABLE recorded ADD INDEX (programid);
ALTER TABLE oldrecorded ADD INDEX (seriesid);
ALTER TABLE oldrecorded ADD INDEX (programid);

One or more if the first few lines will fail but that's okay.
After the remaining lines succeed, cut'n'paste these:

DELETE FROM settings WHERE value='DBSchemaVer';
INSERT INTO settings (value, data) VALUES ('DBSchemaVer', '1042');

Run mythbackend again and it should continue the updates up to
1048 then run normally.

Hope this helps,

--  bjm


More information about the mythtv-users mailing list