[mythtv-users] Database Structure

DaveD mythtv at guiplot.com
Fri May 21 06:46:27 UTC 2010

On 05/19/2010 09:01 PM, DaveD wrote:
> Comcast keeps moving channels around on me.  I have to rescan and 
> manually update xmltv ID and channel numbers every time they move 
> stuff.  This time they've only moved a single channel (105, HD version 
> of 5) and I'd like to just update that info.  If I do a complete 
> rescan, I'm starting from scratch with all channels so I want to just 
> update that channel but I don't know how the database stores the 
> info.  There are lots-O-tables with lots-O-fields.
> I have a system I use for playing around and experimenting and I did a 
> scan on that system just to make sure that 105 was still actually 
> available.  It is, and the clear QAM HD channel shows up as 5_1 and 
> plays fine (just like it used to on my real system before they moved 
> it).  So now I have all the info I need to fix the broken database 
> exported from my test system.  I'm looking for enough information to 
> figure out what fields from the test database I should import into the 
> regular system's database to get 105 working like 5_1 from the test 
> system.
> Is there a comprehensive, definitive guide/document somewhere 
> (preferably up-to-date) that explains all the tables and fields and 
> what they are used for and how they interact?  What is freqid, 
> mplexid, etc?  What's the channelscan_channel table used for?  I'd 
> really rather learn to "fish" (to really understand the database 
> schema), if I can find enough info somewhere.  I know, I can always 
> download the source....
> Dave D.
Got it.  With help from this page, 
http://www.cuymedia.net/mythtv-trunk/group__db__schema.html, which is 
not current or complete, but still VERY helpful.  Here's how I got the 
info from my test system into my main system:

1.  Update the frequency in the dtv_multiplex table whose mplexid 
matches the mplexid of the channel 105 record in the channels table with 
the frequency from the dtv_multiplex table in the test system's 
database.  All the other fields were the same (except the mplexid, of 
2.  Updated the freqid of the record for channel 105 in the channels 
table and set it to the freqid from the test system's database.  Again, 
all other fields (of consequence) were the same.

That's it.  Once I figured out what to do, it was fairly simple.  I'm 
not even sure I needed step 1, but I did it and it works.  Next time 
(and I'm sure there will be a next time, soon) I'll try just updating 
the freqid first and see if it works.

I wonder why they keep moving channels to other frequencies.  Just to 
mess with us?  To try to frustrate us into renting one of their inferior 

Dave D.

More information about the mythtv-users mailing list