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

Michael T. Dean mtdean at thirdcontact.com
Wed Oct 26 12:29:37 EDT 2005


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


More information about the mythtv-users mailing list