-
Notifications
You must be signed in to change notification settings - Fork 3
/
frogesport.sql
211 lines (171 loc) · 6.67 KB
/
frogesport.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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `frogesport`
--
CREATE DATABASE IF NOT EXISTS `frogesport` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `frogesport`;
-- --------------------------------------------------------
--
-- Table structure for table `answers`
--
CREATE TABLE IF NOT EXISTS `answers` (
`aid` int(16) NOT NULL AUTO_INCREMENT,
`answ_question` int(16) NOT NULL,
`answ_answer` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`aid`),
KEY `answ_question` (`answ_question`),
FULLTEXT KEY `answ_answer` (`answ_answer`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `classes`
--
CREATE TABLE IF NOT EXISTS `classes` (
`cid` int(16) NOT NULL AUTO_INCREMENT,
`clas_points` int(16) NOT NULL,
`clas_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`clas_maxmana` int(16) NOT NULL,
`clas_comment` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`cid`),
UNIQUE KEY `clas_points` (`clas_points`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `correctanswers`
--
CREATE TABLE IF NOT EXISTS `correctanswers` (
`caid` int(16) NOT NULL AUTO_INCREMENT,
`coan_qid` int(16) NOT NULL,
`coan_uid` int(16) NOT NULL,
`coan_channel` varchar(200) NOT NULL,
`coan_answer` varchar(256) NOT NULL,
`coan_time` decimal(5,3) NOT NULL,
`coan_date` int(11) NOT NULL,
PRIMARY KEY (`caid`),
KEY `coan_uid` (`coan_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
-- --------------------------------------------------------
--
-- Table structure for table `prizes`
--
CREATE TABLE IF NOT EXISTS `prizes` (
`pid` int(16) NOT NULL AUTO_INCREMENT,
`priz_inarow` int(16) NOT NULL,
`priz_prize` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`pid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `questions`
--
CREATE TABLE IF NOT EXISTS `questions` (
`qid` int(16) NOT NULL AUTO_INCREMENT,
`ques_category` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
`ques_question` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
`ques_tempid` decimal(16,5) NULL,
`ques_source` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
`ques_addedby` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`qid`),
KEY `ques_tempid` (`ques_tempid`),
FULLTEXT KEY `ques_fulltext` (`ques_category`,`ques_question`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `recommendas`
--
CREATE TABLE IF NOT EXISTS `recommendas` (
`raid` int(16) NOT NULL AUTO_INCREMENT,
`reca_rqid` int(16) NOT NULL,
`reca_answer` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`raid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `recommendqs`
--
CREATE TABLE IF NOT EXISTS `recommendqs` (
`rqid` int(16) NOT NULL AUTO_INCREMENT,
`recq_category` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
`recq_question` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
`recq_addedby` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
`recq_source` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
`recq_lastshow` int(11) NOT NULL,
UNIQUE KEY `rqid` (`rqid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
--
-- Triggers `recommendqs`
--
DROP TRIGGER IF EXISTS `delete_recomq`;
DELIMITER //
CREATE TRIGGER `delete_recomq` AFTER DELETE ON `recommendqs`
FOR EACH ROW BEGIN
DELETE FROM recommendas WHERE reca_rqid = OLD.rqid;
END
//
DELIMITER ;
-- --------------------------------------------------------
--
-- Table structure for table `reports`
--
CREATE TABLE IF NOT EXISTS `reports` (
`rid` int(16) NOT NULL AUTO_INCREMENT,
`repo_qid` int(16) NOT NULL,
`repo_comment` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
`repo_user` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`repo_lastshow` int(11) DEFAULT NULL,
PRIMARY KEY (`rid`),
KEY `repo_lastshow` (`repo_lastshow`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `clanmembers`
--
CREATE TABLE `clanmembers` (
`cmid` int(11) NOT NULL AUTO_INCREMENT,
`clme_clid` int(11) NOT NULL,
`clme_uid` int(11) NOT NULL,
`clme_member` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no',
`clme_admin` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no',
`clme_joined` int(11) NOT NULL,
PRIMARY KEY (`cmid`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `clans`
--
CREATE TABLE `clans` (
`clid` int(11) NOT NULL AUTO_INCREMENT,
`clan_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`clan_created` int(11) NOT NULL,
`clan_createdby` int(11) NOT NULL,
PRIMARY KEY (`clid`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`uid` int(16) NOT NULL AUTO_INCREMENT,
`user_nick` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
`user_points_season` int(16) NOT NULL,
`user_points_total` int(16) NOT NULL,
`user_time` double NOT NULL,
`user_inarow` int(16) NOT NULL,
`user_mana` int(16) NOT NULL,
`user_class` int(16) NOT NULL,
`user_lastactive` int(16) NOT NULL,
`user_customclass` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL,
`user_lastactive_chan` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`user_kpm_max` double NOT NULL,
PRIMARY KEY (`uid`),
KEY `user_nick` (`user_nick`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;