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