[mythtv-users] Migrating recordings

Bruce Markey bjm at lvcm.com
Tue Sep 30 04:34:28 EDT 2003


ray cielencki wrote:
> 
>> That's it, that is the only other thing you need to do for
>> myth to find the recordings. However, there is a gotcha.
>> If you try to "update recorded set hostname='newhost' where
>> hostname='oldhost';" it will screw up the TIMESTAMP fields.
>> You would need to update the starttime and endtime for each
>> row to their current values in the same UPDATE command to
>> avoid this problem.
> 
> 
> UPDATE recorded SET 
> hostname='newhost',starttime=starttime,endtime=endtime WHERE 
> hostname='oldhost';
> 
> would avoid this problem.

I don't think so. AFAIK you can't use the string "starttime" or
such as a variable to indicate the existing starttime of the
record. You would need individual commands for each row with
the specific values for the timestamps. Further, you'd need
WHERE clauses for chanid and starttime so that the starttime 
and endtime would only be applied to that one row. It could
be scripted but why bother. Deleting then using the INSERT
lines from the backup takes less than a minute.

--  bjm



More information about the mythtv-users mailing list