-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppdataDatabase.sql
185 lines (148 loc) · 5.91 KB
/
AppdataDatabase.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 08, 2012 at 11:44 AM
-- Server version: 5.1.53
-- PHP Version: 5.3.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `appdata`
--
-- --------------------------------------------------------
--
-- Table structure for table `active_users`
--
CREATE TABLE IF NOT EXISTS `active_users` (
`active_user_database_key` char(36) COLLATE utf8_unicode_ci NOT NULL,
`active_user_id` int(10) unsigned NOT NULL,
`active_user_ip_address` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`active_user_session_start_datetime` datetime NOT NULL,
KEY `active_user_database_key` (`active_user_database_key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `active_users`
--
-- --------------------------------------------------------
--
-- Table structure for table `clients`
--
CREATE TABLE IF NOT EXISTS `clients` (
`client_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`client_key` char(36) COLLATE utf8_unicode_ci NOT NULL,
`client_database_key` char(36) COLLATE utf8_unicode_ci NOT NULL,
`modules_installed` tinyint(3) unsigned NOT NULL DEFAULT '0',
`client_max_users_allowed` bigint(20) unsigned NOT NULL,
`client_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`client_email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`client_logo` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`client_date_created` datetime NOT NULL,
`client_subscription_valid` tinyint(1) NOT NULL,
`client_payed_subscriptions` bigint(20) unsigned NOT NULL,
`client_subscription_valid_till` date NOT NULL,
`client_note` text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`client_id`),
UNIQUE KEY `client_database_key` (`client_database_key`),
UNIQUE KEY `client_key` (`client_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=17 ;
--
-- Dumping data for table `clients`
--
INSERT INTO `clients` (`client_id`, `client_key`, `client_database_key`, `modules_installed`, `client_max_users_allowed`, `client_name`, `client_email`, `client_logo`, `client_date_created`, `client_subscription_valid`, `client_payed_subscriptions`, `client_subscription_valid_till`, `client_note`) VALUES
(1, 'company.name', 'd7069f67c14802b497d4406c169349ab', 0, 5, 'Client name', '[email protected]', '', '2012-01-12 12:20:49', 1, 1, '2012-12-31', 'This is client note'),
(16, 'nova.firma', '53d61a0b524eef1ec3768c14d76dad2b', 0, 5, 'Ime Nove Firme', '[email protected]', '', '2012-02-23 00:00:00', 1, 1, '2012-12-31', 'This is client creation note');
-- --------------------------------------------------------
--
-- Table structure for table `client_modules`
--
CREATE TABLE IF NOT EXISTS `client_modules` (
`client_id` int(10) unsigned NOT NULL,
`module_id` int(10) unsigned NOT NULL,
`module_active` tinyint(1) NOT NULL,
`module_public` tinyint(3) unsigned NOT NULL,
KEY `client_key` (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `client_modules`
--
INSERT INTO `client_modules` (`client_id`, `module_id`, `module_active`, `module_public`) VALUES
(16, 1, 1, 0),
(16, 2, 1, 0),
(16, 3, 1, 0),
(16, 4, 1, 0),
(16, 5, 1, 0);
-- --------------------------------------------------------
--
-- Table structure for table `modules`
--
CREATE TABLE IF NOT EXISTS `modules` (
`module_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`module_name` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`module_deployed` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`module_id`),
UNIQUE KEY `name` (`module_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;
--
-- Dumping data for table `modules`
--
INSERT INTO `modules` (`module_id`, `module_name`, `module_deployed`) VALUES
(1, 'users', 1),
(2, 'privileges', 1),
(3, 'customers', 1);
-- --------------------------------------------------------
--
-- Table structure for table `module_actions`
--
CREATE TABLE IF NOT EXISTS `module_actions` (
`module_action_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`module_id` int(11) unsigned NOT NULL,
`module_action_name` varchar(20) NOT NULL,
`module_action_crud` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`module_action_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=46 ;
--
-- Dumping data for table `module_actions`
--
INSERT INTO `module_actions` (`module_action_id`, `module_id`, `module_action_name`, `module_action_crud`) VALUES
(1, 1, 'create', 0),
(2, 1, 'update', 0),
(3, 2, 'create', 0),
(4, 2, 'update', 0);
-- --------------------------------------------------------
--
-- Table structure for table `ticket_answers`
--
CREATE TABLE IF NOT EXISTS `ticket_answers` (
`question_id` bigint(20) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`admin_id` int(10) unsigned NOT NULL,
`answer` text COLLATE utf8_unicode_ci NOT NULL,
`creation_date` datetime NOT NULL,
PRIMARY KEY (`question_id`,`user_id`),
KEY `admin_id` (`admin_id`),
FULLTEXT KEY `answer` (`answer`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `ticket_answers`
--
-- --------------------------------------------------------
--
-- Table structure for table `ticket_questions`
--
CREATE TABLE IF NOT EXISTS `ticket_questions` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`client_key` char(36) COLLATE utf8_unicode_ci NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`question` text COLLATE utf8_unicode_ci NOT NULL,
`priority` enum('low','mid','high') COLLATE utf8_unicode_ci NOT NULL,
`can_other_user_answer` tinyint(4) NOT NULL,
`ticket_answered` tinyint(4) NOT NULL,
`creation_date` datetime NOT NULL,
`solved` tinyint(4) NOT NULL,
PRIMARY KEY (`id`,`user_id`),
FULLTEXT KEY `question` (`question`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
--
-- Dumping data for table `ticket_questions`
--