File: 0.01.1a/sql/schema.sql (View as HTML)

  1: -- MySQL dump 10.13  Distrib 5.5.24, for Linux (i686)
  2: --
  3: -- Host: localhost    Database: freedesk
  4: -- ------------------------------------------------------
  5: -- Server version	5.5.24
  6: 
  7: /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  8: /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  9: /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
 10: /*!40101 SET NAMES utf8 */;
 11: /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
 12: /*!40103 SET TIME_ZONE='+00:00' */;
 13: /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
 14: /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
 15: /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
 16: /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
 17: 
 18: --
 19: -- Table structure for table `customer`
 20: --
 21: 
 22: /*!40101 SET @saved_cs_client     = @@character_set_client */;
 23: /*!40101 SET character_set_client = utf8 */;
 24: CREATE TABLE `customer` (
 25:   `customerid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
 26:   `firstname` varchar(254) NOT NULL,
 27:   `lastname` varchar(254) NOT NULL,
 28:   `email` varchar(254) NOT NULL,
 29:   `username` varchar(254) NOT NULL,
 30:   `password` varchar(254) NOT NULL,
 31:   PRIMARY KEY (`customerid`)
 32: ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
 33: /*!40101 SET character_set_client = @saved_cs_client */;
 34: 
 35: --
 36: -- Table structure for table `email`
 37: --
 38: 
 39: /*!40101 SET @saved_cs_client     = @@character_set_client */;
 40: /*!40101 SET character_set_client = utf8 */;
 41: CREATE TABLE `email` (
 42:   `accountid` mediumint(9) NOT NULL AUTO_INCREMENT,
 43:   `name` varchar(254) NOT NULL,
 44:   `host` varchar(254) NOT NULL,
 45:   `from` varchar(254) NOT NULL,
 46:   `fromname` varchar(254) NOT NULL,
 47:   `wordwrap` int(11) NOT NULL,
 48:   `auth` int(11) NOT NULL,
 49:   `username` varchar(254) NOT NULL,
 50:   `password` varchar(254) NOT NULL,
 51:   `smtpsec` varchar(128) NOT NULL,
 52:   PRIMARY KEY (`accountid`)
 53: ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
 54: /*!40101 SET character_set_client = @saved_cs_client */;
 55: 
 56: --
 57: -- Table structure for table `permgroup`
 58: --
 59: 
 60: /*!40101 SET @saved_cs_client     = @@character_set_client */;
 61: /*!40101 SET character_set_client = utf8 */;
 62: CREATE TABLE `permgroup` (
 63:   `permgroupid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
 64:   `groupname` varchar(254) NOT NULL,
 65:   PRIMARY KEY (`permgroupid`)
 66: ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
 67: /*!40101 SET character_set_client = @saved_cs_client */;
 68: 
 69: --
 70: -- Table structure for table `permissions`
 71: --
 72: 
 73: /*!40101 SET @saved_cs_client     = @@character_set_client */;
 74: /*!40101 SET character_set_client = utf8 */;
 75: CREATE TABLE `permissions` (
 76:   `permissionid` bigint(20) NOT NULL AUTO_INCREMENT,
 77:   `permissiontype` varchar(16) NOT NULL,
 78:   `permission` varchar(254) NOT NULL,
 79:   `usergroupid` varchar(254) NOT NULL,
 80:   `allowed` tinyint(4) NOT NULL,
 81:   PRIMARY KEY (`permissionid`),
 82:   KEY `permissiontype` (`permissiontype`,`permission`,`usergroupid`)
 83: ) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=latin1;
 84: /*!40101 SET character_set_client = @saved_cs_client */;
 85: 
 86: --
 87: -- Table structure for table `plugins`
 88: --
 89: 
 90: /*!40101 SET @saved_cs_client     = @@character_set_client */;
 91: /*!40101 SET character_set_client = utf8 */;
 92: CREATE TABLE `plugins` (
 93:   `pluginid` bigint(20) NOT NULL AUTO_INCREMENT,
 94:   `plugin` varchar(254) NOT NULL,
 95:   `active` int(11) NOT NULL DEFAULT '0',
 96:   PRIMARY KEY (`pluginid`),
 97:   KEY `active` (`active`)
 98: ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
 99: /*!40101 SET character_set_client = @saved_cs_client */;
100: 
101: --
102: -- Table structure for table `priority`
103: --
104: 
105: /*!40101 SET @saved_cs_client     = @@character_set_client */;
106: /*!40101 SET character_set_client = utf8 */;
107: CREATE TABLE `priority` (
108:   `priorityid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
109:   `priorityname` varchar(128) NOT NULL,
110:   `resolutionsla` bigint(20) NOT NULL,
111:   `schedule` int(11) NOT NULL,
112:   PRIMARY KEY (`priorityid`)
113: ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=latin1;
114: /*!40101 SET character_set_client = @saved_cs_client */;
115: 
116: --
117: -- Table structure for table `request`
118: --
119: 
120: /*!40101 SET @saved_cs_client     = @@character_set_client */;
121: /*!40101 SET character_set_client = utf8 */;
122: CREATE TABLE `request` (
123:   `requestid` bigint(20) NOT NULL AUTO_INCREMENT,
124:   `customer` bigint(20) NOT NULL,
125:   `assignteam` bigint(20) NOT NULL,
126:   `assignuser` varchar(254) NOT NULL,
127:   `class` int(11) NOT NULL,
128:   `openeddt` datetime NOT NULL,
129:   `status` int(11) NOT NULL,
130:   `priority` int(11) NOT NULL,
131:   `closeddt` datetime NOT NULL,
132:   PRIMARY KEY (`requestid`),
133:   KEY `customer` (`customer`,`assignteam`,`assignuser`,`status`)
134: ) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=latin1;
135: /*!40101 SET character_set_client = @saved_cs_client */;
136: 
137: --
138: -- Table structure for table `requestclass`
139: --
140: 
141: /*!40101 SET @saved_cs_client     = @@character_set_client */;
142: /*!40101 SET character_set_client = utf8 */;
143: CREATE TABLE `requestclass` (
144:   `classid` int(10) unsigned NOT NULL AUTO_INCREMENT,
145:   `classname` varchar(254) NOT NULL,
146:   `classclass` varchar(254) NOT NULL,
147:   PRIMARY KEY (`classid`)
148: ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
149: /*!40101 SET character_set_client = @saved_cs_client */;
150: 
151: --
152: -- Table structure for table `session`
153: --
154: 
155: /*!40101 SET @saved_cs_client     = @@character_set_client */;
156: /*!40101 SET character_set_client = utf8 */;
157: CREATE TABLE `session` (
158:   `session_id` varchar(254) NOT NULL,
159:   `username` varchar(254) NOT NULL,
160:   `sessiontype` int(11) NOT NULL DEFAULT '-1',
161:   `created_dt` datetime NOT NULL,
162:   `updated_dt` datetime NOT NULL,
163:   `expires_dt` datetime NOT NULL,
164:   `realname` varchar(254) NOT NULL,
165:   PRIMARY KEY (`session_id`)
166: ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
167: /*!40101 SET character_set_client = @saved_cs_client */;
168: 
169: --
170: -- Table structure for table `status`
171: --
172: 
173: /*!40101 SET @saved_cs_client     = @@character_set_client */;
174: /*!40101 SET character_set_client = utf8 */;
175: CREATE TABLE `status` (
176:   `status` int(11) NOT NULL,
177:   `description` varchar(254) NOT NULL,
178:   PRIMARY KEY (`status`)
179: ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
180: /*!40101 SET character_set_client = @saved_cs_client */;
181: 
182: --
183: -- Table structure for table `sysconfig`
184: --
185: 
186: /*!40101 SET @saved_cs_client     = @@character_set_client */;
187: /*!40101 SET character_set_client = utf8 */;
188: CREATE TABLE `sysconfig` (
189:   `sc_option` varchar(254) NOT NULL,
190:   `sc_value` varchar(254) NOT NULL,
191:   PRIMARY KEY (`sc_option`),
192:   UNIQUE KEY `sc_option` (`sc_option`)
193: ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
194: /*!40101 SET character_set_client = @saved_cs_client */;
195: 
196: --
197: -- Table structure for table `syslog`
198: --
199: 
200: /*!40101 SET @saved_cs_client     = @@character_set_client */;
201: /*!40101 SET character_set_client = utf8 */;
202: CREATE TABLE `syslog` (
203:   `event_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
204:   `event_dt` datetime NOT NULL,
205:   `event` varchar(254) NOT NULL,
206:   `event_class` varchar(128) NOT NULL,
207:   `event_type` varchar(128) NOT NULL,
208:   `event_level` int(11) NOT NULL,
209:   PRIMARY KEY (`event_id`)
210: ) ENGINE=InnoDB AUTO_INCREMENT=41253 DEFAULT CHARSET=latin1;
211: /*!40101 SET character_set_client = @saved_cs_client */;
212: 
213: --
214: -- Table structure for table `team`
215: --
216: 
217: /*!40101 SET @saved_cs_client     = @@character_set_client */;
218: /*!40101 SET character_set_client = utf8 */;
219: CREATE TABLE `team` (
220:   `teamid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
221:   `teamname` varchar(254) NOT NULL,
222:   PRIMARY KEY (`teamid`)
223: ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
224: /*!40101 SET character_set_client = @saved_cs_client */;
225: 
226: --
227: -- Table structure for table `teamuserlink`
228: --
229: 
230: /*!40101 SET @saved_cs_client     = @@character_set_client */;
231: /*!40101 SET character_set_client = utf8 */;
232: CREATE TABLE `teamuserlink` (
233:   `linkid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
234:   `teamid` bigint(20) unsigned NOT NULL,
235:   `username` varchar(254) NOT NULL,
236:   PRIMARY KEY (`linkid`),
237:   KEY `teamid` (`teamid`,`username`)
238: ) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1;
239: /*!40101 SET character_set_client = @saved_cs_client */;
240: 
241: --
242: -- Table structure for table `templates`
243: --
244: 
245: /*!40101 SET @saved_cs_client     = @@character_set_client */;
246: /*!40101 SET character_set_client = utf8 */;
247: CREATE TABLE `templates` (
248:   `templateid` varchar(128) NOT NULL,
249:   `subject` text NOT NULL,
250:   `body` text NOT NULL,
251:   PRIMARY KEY (`templateid`)
252: ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
253: /*!40101 SET character_set_client = @saved_cs_client */;
254: 
255: --
256: -- Table structure for table `update`
257: --
258: 
259: /*!40101 SET @saved_cs_client     = @@character_set_client */;
260: /*!40101 SET character_set_client = utf8 */;
261: CREATE TABLE `update` (
262:   `updateid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
263:   `requestid` bigint(20) unsigned NOT NULL,
264:   `update` text NOT NULL,
265:   `public` tinyint(4) NOT NULL,
266:   `updateby` varchar(254) NOT NULL,
267:   `updatedt` datetime NOT NULL,
268:   PRIMARY KEY (`updateid`),
269:   KEY `requestid` (`requestid`)
270: ) ENGINE=InnoDB AUTO_INCREMENT=150 DEFAULT CHARSET=latin1;
271: /*!40101 SET character_set_client = @saved_cs_client */;
272: 
273: --
274: -- Table structure for table `user`
275: --
276: 
277: /*!40101 SET @saved_cs_client     = @@character_set_client */;
278: /*!40101 SET character_set_client = utf8 */;
279: CREATE TABLE `user` (
280:   `username` varchar(254) NOT NULL,
281:   `password` varchar(254) NOT NULL,
282:   `realname` varchar(254) NOT NULL,
283:   `email` varchar(254) NOT NULL,
284:   `permgroup` bigint(20) unsigned NOT NULL,
285:   `authtype` varchar(254) NOT NULL,
286:   `sparefield0` varchar(254) NOT NULL,
287:   `sparefield1` varchar(254) NOT NULL,
288:   `sparefield2` varchar(254) NOT NULL,
289:   `sparefield3` varchar(254) NOT NULL,
290:   `sparefield4` varchar(254) NOT NULL,
291:   `sparefield5` varchar(254) NOT NULL,
292:   `sparefield6` varchar(254) NOT NULL,
293:   `sparefield7` varchar(254) NOT NULL,
294:   `sparefield8` varchar(254) NOT NULL,
295:   `sparefield9` varchar(254) NOT NULL,
296:   PRIMARY KEY (`username`)
297: ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
298: /*!40101 SET character_set_client = @saved_cs_client */;
299: 
300: --
301: -- Table structure for table `vis_country`
302: --
303: 
304: /*!40101 SET @saved_cs_client     = @@character_set_client */;
305: /*!40101 SET character_set_client = utf8 */;
306: CREATE TABLE `vis_country` (
307:   `country` char(2) NOT NULL DEFAULT '',
308:   `country_desc` varchar(120) NOT NULL DEFAULT '',
309:   `lat` float DEFAULT NULL,
310:   `long` float DEFAULT NULL,
311:   KEY `country_desc` (`country_desc`),
312:   KEY `country` (`country`)
313: ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
314: /*!40101 SET character_set_client = @saved_cs_client */;
315: /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
316: 
317: /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
318: /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
319: /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
320: /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
321: /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
322: /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
323: /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
324: 
325: -- Dump completed on 2012-08-22  1:31:09
326: