[mythtv] Duplicated column in recorded in today's cvs?

Bruce Markey bjm at lvcm.com
Fri Jul 23 17:28:17 EDT 2004


IvanK. wrote:
> Replying to myself, this is what I had to do:
> 
> ALTER TABLE oldprogram DROP COLUMN oldtitle;
-------------------------^^^^--------^^^^^^^^
> ALTER TABLE recorded DROP COLUMN lastmodified;
> ALTER TABLE recorded DROP COLUMN filesize;
> 
> After that everything was good again.

Or not. My guess is that mythfilldatabase will fail from
now on.

While 1052 ADDs lastmodified and filesize to recorded,
the ALTER for oldprogram is just to change the airdate to
DATETIME, and will no re-add the oldtitle column you
dropped.

Your title history is now gone, and the table is hozed
so you should:

mysql> drop table oldprogram;
mysql> CREATE TABLE oldprogram (oldtitle VARCHAR(128) NOT NULL PRIMARY KEY, airdate TIMESTAMP NOT NULL);

You may then want to find your most recent DB backup
(http://www.mythtv.org/docs/mythtv-HOWTO-21.html#ss21.5)
and:

$ grep 'INSERT INTO oldprogram ' mythtv_backup.sql > foo
$ # sanity check foo
$ mysql -u mythtv -pmythtv mythconverg < foo

Hope this helps,

--  bjm


More information about the mythtv-dev mailing list