[mythtv] SQL Update 1038 Broken By tv_grab_uk_rt

Martin Smith martin at spamcop.net
Mon Apr 19 10:01:02 EDT 2004


Hi,

When I upgraded from CVS this morning a database schema update failed because it
was unable to create a unique index on the people table.

On investigation the grabber seems to have been creating entries in the people
table with a fragment of Javascript instead of their name. This broke the index
because they're all the same string. After this happens you can't start the
backend because it tries to reapply all the pieces of the update that worked
before and complains about them.

If this particular problem happens to anyone else you can back out the changes
made by this update with the SQL below. Maybe back up the database first, just
in case.

USE mythconverg;

ALTER TABLE videosource DROP COLUMN lineupid;
ALTER TABLE videosource DROP COLUMN password;

ALTER TABLE program DROP COLUMN stereo;
ALTER TABLE program DROP COLUMN subtitled;
ALTER TABLE program DROP COLUMN hdtv;
ALTER TABLE program DROP COLUMN closecaptioned;
ALTER TABLE program DROP COLUMN partnumber;
ALTER TABLE program DROP COLUMN parttotal;
ALTER TABLE program DROP COLUMN seriesid;
ALTER TABLE program DROP COLUMN originalairdate;
ALTER TABLE program DROP COLUMN showtype;
ALTER TABLE program DROP COLUMN colorcode;
ALTER TABLE program DROP COLUMN syndicatedepisodenumber;
ALTER TABLE program DROP COLUMN programid;

CREATE INDEX name ON people(name);

What I then did was:

UPDATE people SET name = person WHERE name like 'javascript%';

To make sure the name column was unique. I then ran mythbackend up again.

I doubt that this is the best solution and it seems like a hack but it got me
running again.

Martin


More information about the mythtv-dev mailing list