[mythtv] Database schema checker

Richard Woelk richardwoelk at yahoo.ca
Tue Aug 26 13:37:37 UTC 2008



ian dobson wrote:
> Hi,
>
> It actually does abit more. I ended up using various backup's from my system 
> to rebuild the database (Recordings where OK) and as such I ended up with 
> alot of orphaned entries in various tables and rather than manually trying 
> to fix them I started writing this script to atleast find out what was wrong 
> with recording X.
> After I got the system backup and runnng I just continued working on the 
> script/adding checks. At the moment the output looks like:-
>
> [--].No command line options defined trying mysql.txt
> [--].Try ./CheckMythDB.pl -H for help
> [OK].Found 2 video sources
> [OK].Videosource (1) analog has a EPG source defined (tv_grab_ch_search)
> [OK].Videosource (2) digital has a EPG source defined (eitonly)
> [OK].Found 2 card inputs for Videoinput 1
> [OK].Found 4 card inputs for Videoinput 2
> [--].Checking start channel for each cardinput
> [OK].All InputCards are linked to a videosource
> [OK].Videosource 1 has 10 channels defined
> [OK].Videosource 2 has 35 channels defined
> [OK].All channels have a valid videosource
> [OK].All dtv_multiplex channels have a valid videosource
> [OK].All channel entries have a valid dtv_multiplex
> [OK].All dtv_multiplex entries have a valid channel
> [OK].Channel ANIXE HD has 211 programs in EPG  and data available for 2.8740 
> days
> [OK].Channel ARTE has 249 programs in EPG  and data available for 0.0143 
> days
> [OK].Channel RTL Television has 454 programs in EPG  and data available for 
> 6.8268 days
> [OK].Channel RTL2 has 384 programs in EPG  and data available for 6.8199 
> days
> [OK].Channel Super RTL has 527 programs in EPG  and data available for 
> 6.6150 days
> [OK].Recording Doctor Who 2008-08-16 18:54:00 has 8204 seek entries
> [--].Recording Doctor Who 2008-08-16 18:54:00 Mythcommflag ran but no 
> commercials found (commflag still running?)
> [!!].Recording The Fast And The Furious 2008-08-16 20:09:00 does not appear 
> to have a seeklist
> [OK].Recording The Fast And The Furious 2008-08-16 20:09:00 has 8 markup 
> entries
> [!!].Recording Outland - Planet der Verdammten 2008-08-16 21:54:00 does not 
> appear to have a seeklist
> [OK].Recording Outland - Planet der Verdammten 2008-08-16 21:54:00 has 10 
> markup entries
> [OK].File 32434_20080818181400.mpg storage group 'Default' exists in 
> database
> [OK].File 32434_20080819181400.mpg storage group 'Default' exists in 
> database
> [OK].File 32437_20080809221400.mpg storage group 'Default' exists in 
> database
> [--].File 32437_20080819201545.mpg exits in the database but it's in storage 
> group 'LiveTV'
> [--].File 32437_20080819221004.mpg exits in the database but it's in storage 
> group 'LiveTV'
>
>
> Regards
> Ian Dobson
>   
>
Ian,
    That looks really good. I have wanted something like this for a 
while, since I like to try trunk every once in a while,
going back in database schema is really hard to do manually.

- Richard



More information about the mythtv-dev mailing list