-- MySQL dump 9.11
--
-- Host: localhost    Database: xxv
-- ------------------------------------------------------
-- Server version	4.0.24_Debian-10

--
-- Table structure for table `AUTOTIMER`
--

DROP TABLE IF EXISTS `AUTOTIMER`;
CREATE TABLE `AUTOTIMER` (
  `Id` int(16) unsigned NOT NULL auto_increment,
  `Activ` enum('y','n') default 'y',
  `Done` enum('y','n') default 'y',
  `Search` varchar(100) NOT NULL default '',
  `InFields` set('title','subtitle','description') NOT NULL default '',
  `Channels` text,
  `Start` varchar(4) default '0000',
  `Stop` varchar(4) default '0000',
  `MinLength` int(11) default '0',
  `Priority` int(11) default NULL,
  `Lifetime` int(11) default NULL,
  `Dir` varchar(100) default NULL,
  `VPS` enum('y','n') default 'y',
  `prevminutes` int(11) default NULL,
  `afterminutes` int(11) default NULL,
  `Weekdays` set('Mon','Tue','Wed','Thu','Fri','Sat','Sun') NOT NULL default '',
  PRIMARY KEY  (`Id`)
) TYPE=MyISAM;

--
-- Table structure for table `CHANNELS`
--

DROP TABLE IF EXISTS `CHANNELS`;
CREATE TABLE `CHANNELS` (
  `Id` varchar(100) NOT NULL default '',
  `Name` varchar(100) NOT NULL default '',
  `Frequency` int(11) NOT NULL default '0',
  `Parameters` varchar(100) default '',
  `Source` varchar(100) default NULL,
  `Srate` varchar(100) default '',
  `VPID` varchar(100) default '',
  `APID` varchar(100) default '',
  `TPID` varchar(100) default '',
  `CA` varchar(100) default '',
  `SID` varchar(100) default '',
  `NID` varchar(100) default '',
  `TID` varchar(100) default '',
  `RID` varchar(100) default '',
  `GRP` int(11) default '0',
  `POS` int(11) NOT NULL default '0',
  PRIMARY KEY  (`Id`)
) TYPE=MyISAM;

--
-- Table structure for table `CHANNELGROUPS`
--

DROP TABLE IF EXISTS `CHANNELGROUPS`;
CREATE TABLE CHANNELGROUPS (
  Id int(11) auto_increment not NULL,
  Name varchar(100) default 'unknown',
  Counter int(11) default '0',
  PRIMARY KEY  (Id)
) TYPE=MyISAM;

--
-- Table structure for table `EPG`
--

DROP TABLE IF EXISTS `EPG`;
CREATE TABLE `EPG` (
  `eventid` int(16) unsigned NOT NULL default '0',
  `title` varchar(100) NOT NULL default '',
  `subtitle` varchar(100) default '',
  `description` longtext,
  `channel_id` varchar(100) NOT NULL default '',
  `starttime` datetime NOT NULL default '0000-00-00 00:00:00',
  `duration` int(11) NOT NULL default '0',
  `tableid` varchar(100) default '',
  `image` text default '',
  `addtime` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`eventid`),
  KEY `starttime` (`starttime`),
  KEY `channel_id` (`channel_id`)
) TYPE=MyISAM;

--
-- Table structure for table `MUSIC`
--

DROP TABLE IF EXISTS `MUSIC`;
CREATE TABLE `MUSIC` (
  `Id` int(16) unsigned NOT NULL auto_increment,
  `FILE` text NOT NULL,
  `ARTIST` varchar(128) default 'unknown',
  `ALBUM` varchar(128) default 'unknown',
  `TITLE` varchar(128) default 'unknown',
  `COMMENT` varchar(128) default NULL,
  `TRACKNUM` varchar(10) default '0',
  `YEAR` int(4) default '1970',
  `GENRE` varchar(128) default NULL,
  `BITRATE` int(4) default NULL,
  `FREQUENCY` varchar(4) default NULL,
  `SECS` int(11) NOT NULL default '0',
  PRIMARY KEY  (`Id`)
) TYPE=MyISAM;

--
-- Table structure for table `OLDEPG`
--

DROP TABLE IF EXISTS `OLDEPG`;
CREATE TABLE `OLDEPG` (
  `eventid` int(16) unsigned NOT NULL default '0',
  `title` varchar(100) NOT NULL default '',
  `subtitle` varchar(100) default '',
  `description` longtext,
  `channel_id` varchar(100) NOT NULL default '',
  `starttime` datetime NOT NULL default '0000-00-00 00:00:00',
  `duration` int(11) NOT NULL default '0',
  `tableid` varchar(100) default '',
  `image` text default '',
  `addtime` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`eventid`),
  KEY `starttime` (`starttime`),
  KEY `channel_id` (`channel_id`)
) TYPE=MyISAM;

--
-- Table structure for table `RECORDS`
--

DROP TABLE IF EXISTS `RECORDS`;
CREATE TABLE `RECORDS` (
  `eventid` int(16) unsigned NOT NULL default '0',
  `RecordId` int(16) unsigned NOT NULL default '0',
  `Duration` int(11) NOT NULL default '0',
  `Start` int(11) NOT NULL default '0',
  `Path` text NOT NULL,
  `Prio` tinyint(4) NOT NULL default '0',
  `Lifetime` tinyint(4) NOT NULL default '0',
  `State` tinyint(4) NOT NULL default '0',
  `Marks` text,
  `addtime` timestamp(14) NOT NULL,
  PRIMARY KEY  (`eventid`),
  UNIQUE KEY `eventid` (`eventid`)
) TYPE=MyISAM;

--
-- Table structure for table `TIMERS`
--

DROP TABLE IF EXISTS `TIMERS`;
CREATE TABLE `TIMERS` (
  `Id` int(16) unsigned NOT NULL default '0',
  `Status` char(1) default '1',
  `ChannelID` varchar(100) NOT NULL default '',
  `Day` varchar(100) default '-------',
  `Start` int(11) default NULL,
  `Stop` int(11) default NULL,
  `Priority` int(11) default NULL,
  `Lifetime` int(11) default NULL,
  `File` varchar(100) default NULL,
  `Summary` text,
  `NextStartTime` datetime default NULL,
  `NextStopTime` datetime default NULL,
  `Collision` varchar(100) default '0',
  `NextEpgId` int(16) unsigned default '0',
  `AutotimerId` int(16) unsigned default '0',
  `addtime` timestamp(14) NOT NULL,
  PRIMARY KEY  (`Id`)
) TYPE=MyISAM;

--
-- Table structure for table `USER`
--

DROP TABLE IF EXISTS `USER`;
CREATE TABLE `USER` (
  `Id` int(16) unsigned NOT NULL auto_increment,
  `Name` varchar(100) NOT NULL default '',
  `Password` varchar(100) NOT NULL default '',
  `Level` set('admin','user','guest') NOT NULL default '',
  `Prefs` varchar(100) default '',
  `UserPrefs` varchar(100) default '',
  `Deny` set('tlist','alist','rlist','mlist','tedit','aedit','redit','remote','cedit') default NULL,
  `MaxLifeTime` int(2) default '0',
  `MaxPriority` int(2) default '0',
  PRIMARY KEY  (`Id`)
) TYPE=MyISAM;

--
-- Table structure for table `VERSION`
--

DROP TABLE IF EXISTS `VERSION`;
CREATE TABLE `VERSION` (
  `Version` tinyint(4) NOT NULL default '0'
) TYPE=MyISAM;

