[mythtv] Problem with DataDirect Migration docs

James Armstrong james at thearmstrongs.org
Wed May 19 13:53:19 EDT 2004


Robert Kulagowski wrote:

>>> I haven't updated yet and don't know if this will work in mysql3, 
>>> but this should work as long as there is a channel_copy table:
>>>
>>> update channel
>>> set icon = (select distinct icon from channel_copy
>>>             where channel.callsign = channel_copy.callsign);
>>
>>
>> Has anyone still running MySQL 3 tried this and had it work 
>> correctly? I'll include it if I get some feedback that this is doing 
>> the Right Thing.
>
>
With some trial and error we (David and James) have found that users of 
MySQL 3 can import the icons from the channel_copy table using the 
following steps:

1) Follow the faq to copy the channel table into channel_copy then 
complete the DataDirect upgrade.

2) Run mysql as root and save the icons and callsigns in to a text file 
using the following commands:

     mysql -uroot -p mythconverg
     select callsign, icon from channel_copy where icon <> '' into 
OUTFILE '/tmp/icons.sql';
     exit;

3) Parse the text file that was saved from MySQL so it can be imported 
into the original channel table using the following command:

    sed -e 's/\(^.*\)\t\(.*\)/UPDATE channel SET icon="\2" WHERE 
callsign="\1";/' /tmp/icons.sql  > /tmp/upd_icon.sql

4) Import the parsed and formatted text file back into the channel table 
using MySQL as follows:

    mysql -umythtv -pmythtv mythconverg < /tmp/upd_icon.sql
 
- James



More information about the mythtv-dev mailing list