2 -- Table structure for table 'location_types'
5 DROP TABLE IF EXISTS `location_types`;
6 CREATE TABLE `location_types` (
7 `id` int(11) NOT NULL auto_increment,
8 `description` text NOT NULL,
10 ) TYPE=MyISAM COMMENT='Location types';
12 /*!40000 ALTER TABLE `location_types` DISABLE KEYS */;
15 -- Data for table 'location_types'
19 LOCK TABLES `location_types` WRITE;
20 INSERT INTO `location_types` VALUES (0,'');
21 UPDATE `location_types` SET id = 0, description = '';
22 INSERT INTO `location_types` VALUES (1,'Physical area'),(2,'Human');
24 /*!40000 ALTER TABLE `location_types` ENABLE KEYS */;
28 -- Table structure for table 'locations'
31 DROP TABLE IF EXISTS `locations`;
32 CREATE TABLE `locations` (
33 `id` int(11) NOT NULL auto_increment,
34 `type` int(11) NOT NULL default '0',
35 `description` text NOT NULL,
37 ) TYPE=MyISAM COMMENT='Locations where media can be found';
39 /*!40000 ALTER TABLE `locations` DISABLE KEYS */;
42 -- Data for table 'locations'
46 LOCK TABLES `locations` WRITE;
47 INSERT INTO `locations` VALUES (0,0,'');
48 UPDATE `locations` SET id = 0, description = '';
50 /*!40000 ALTER TABLE `locations` ENABLE KEYS */;
54 -- Table structure for table 'categories'
57 DROP TABLE IF EXISTS `categories`;
58 CREATE TABLE `categories` (
59 `catid` int(11) NOT NULL auto_increment,
60 `name` varchar(48) NOT NULL default '',
64 /*!40000 ALTER TABLE `categories` DISABLE KEYS */;
67 -- Table structure for table 'files'
70 DROP TABLE IF EXISTS `files`;
71 CREATE TABLE `files` (
72 `fileid` int(11) NOT NULL auto_increment,
73 `mediaid` int(11) NOT NULL default '0',
74 `size` int(11) NOT NULL default '0',
75 `time` int(11) NOT NULL default '0',
76 `path` varchar(255) NOT NULL default '',
77 `name` varchar(255) NOT NULL default '',
78 PRIMARY KEY (`fileid`),
79 KEY `mediaid` (`mediaid`),
86 /*!40000 ALTER TABLE `files` DISABLE KEYS */;
89 -- Table structure for table 'media'
92 DROP TABLE IF EXISTS `media`;
93 CREATE TABLE `media` (
94 `mediaid` int(11) NOT NULL auto_increment,
95 `catid` int(11) NOT NULL default '0',
96 `type` tinyint(4) NOT NULL default '0',
97 `added` int(11) NOT NULL default '0',
98 `info1` int(11) NOT NULL default '0',
99 `info2` int(11) NOT NULL default '0',
100 `name` varchar(128) NOT NULL default '',
101 `comment` tinytext NOT NULL,
102 `location` int(11) NOT NULL default '0',
103 PRIMARY KEY (`mediaid`),
104 KEY `catid` (`catid`),
105 KEY `added` (`added`),
106 KEY `info1` (`info1`),
107 KEY `info2` (`info2`),
111 /*!40000 ALTER TABLE `media` DISABLE KEYS */;
114 -- Table structure for table 'tracks'
117 DROP TABLE IF EXISTS `tracks`;
118 CREATE TABLE `tracks` (
119 `trackid` int(11) NOT NULL default '0',
120 `mediaid` int(11) NOT NULL default '0',
121 `name` varchar(160) NOT NULL default '',
122 `length` int(11) NOT NULL default '0',
123 PRIMARY KEY (`trackid`,`mediaid`),
124 KEY `length` (`length`),
128 /*!40000 ALTER TABLE `tracks` DISABLE KEYS */;