[mythtv-users] new recordings missing database fields after R5A22 upgrade

Byron Poland wpoland at gmail.com
Wed Oct 26 13:57:41 EDT 2005


On 10/26/05, Michael T. Dean <mtdean at thirdcontact.com> wrote:
> Byron Poland wrote:
>
> >On 10/26/05, Kevin Kuphal <kuphal at dls.net> wrote:
> >
> >
> >>Byron Poland wrote:
> >>
> >>
> >>
> >>>Since upgrading my backend to Knoppmyth R5A22, all of the recordings
> >>>I've made are missing the basename, progstart, and progend fields (ie
> >>>they are blank).  this causes jobs like commercial flagging to fail.
> >>>If I fill in the missing data manually into the tables, things work as
> >>>expected.
> >>>
> >>>Anyone else seeing anything like this?
> >>>
> >>>I know very little of mysql.  When my commfaging stopped working, I
> >>>looked at the tables with mysqlcc and saw the missing data.
> >>>
> >>>
> >>>
> >>>
> >>Sounds like a DB update was missed.  If you do not have the basename
> >>field in your DB, execute this SQL statement against it:
> >>
> >>ALTER TABLE recorded ADD COLUMN basename varchar(128) NOT NULL DEFAULT;
> >>
> >>and then, once it is in your database, run this:
> >>
> >>UPDATE recorded SET basename =
> >>           CONCAT(chanid, '_', DATE_FORMAT(starttime,
> >>                  '%Y%m%d%H%i00'), '_',
> >>                  DATE_FORMAT(endtime, '%Y%m%d%H%i00'), '.nuv');
> >>
> >>
> >>_______________________________________________
> >>mythtv-users mailing list
> >>mythtv-users at mythtv.org
> >>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >>
> >>
> >>
> >
> >
> >Thanks for your reply.  I already have the basename field, it just
> >doesn't get filled in for new recording.  so I just ran the second
> >statement, and it seems to be working now.
> >
> >My progstart and progend fields also weren't working but using the
> >statement you provided as a base I got them to work:
> >
> >UPDATE recorded SET progstart = CONCAT(DATE_FORMAT(starttime, '%Y%m%d%H%i00'));
> >
> >and
> >
> >UPDATE recorded SET progend = CONCAT(DATE_FORMAT(endtime, '%Y%m%d%H%i00'));
> >
> >And they seem to be working again too with a test recording, that now
> >fills the fields correctly.
> >
> >
> OK, following on to my previous post--which hinted at the fact that
> future updates will fail--you're now at schema version 1096--which also
> contains non-idempotent DDL--so you would need to run:
>
> UPDATE settings SET data = '1096' WHERE value = 'DBSchemaVer';
>
> Also, this seems to confirm my suspicions that all future updates are
> guaranteed to fail if you mess with your database schema incorrectly...
> And, the bad thing is that I've seen many suggestions like this that
> totally ignored DBSchemaVer.
>
> Therefore, can you post the error messages that exist in your
> mythbackend log file (if you aren't currently logging, just start up
> mythbackend before updating DBSchemaVer so you can get them).  If you do
> so, others who see them in their logs will have a reference in the
> archives.  (OK, maybe I'm being too optimistic assuming people will read
> /both/ their logs /and/ the archives. ;)
>
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


You've totally lost me for the most part.  (Like I said I know very
little of mysql).  I'll check my backend log on a restart..  and post
anything related to DBSchemaVer.

How was my DB supposed to be updated in the first place?  I'm not home
now, but will read this thread a few more times and see if I can put
it together, and post some relevent sections of my backend log.  If I
didn't already have so many recordings that I haven't watched, and a
hand made qam channel lineup I'd consider wiping it clean...

Also I have the mysql db dump from when I backed it ub before the
knoppmyth upgrade.  Perhaps I can delete the newer recordings, to get
them off the drive, and then re-instate the backup and do what ever
update I was supposed to do in the beginning.

Well I'll check the logs first and post back.

I appreciate the help, hopefully this thread becomes useful to others.


More information about the mythtv-users mailing list