-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdatabase_schema.sql
More file actions
189 lines (148 loc) · 5.62 KB
/
Copy pathdatabase_schema.sql
File metadata and controls
189 lines (148 loc) · 5.62 KB
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
-- phpMyAdmin SQL Dump
-- version 3.5.8.1
-- http://www.phpmyadmin.net
--
-- Host: dd29608.kasserver.com
-- Generation Time: May 12, 2015 at 08:27 PM
-- Server version: 5.6.24-nmm1-log
-- PHP Version: 5.5.22-nmm1
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: `d0141d48`
--
-- --------------------------------------------------------
--
-- Table structure for table `achievements`
--
CREATE TABLE IF NOT EXISTS `achievements` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Name` text NOT NULL,
`Description` text NOT NULL,
`Image` text,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
-- --------------------------------------------------------
--
-- Table structure for table `achievement_objectives`
--
CREATE TABLE IF NOT EXISTS `achievement_objectives` (
`AchievementID` int(11) NOT NULL,
`AttributeID` int(11) NOT NULL,
`RequiredValue` int(11) NOT NULL,
PRIMARY KEY (`AchievementID`,`AttributeID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `achievement_player`
--
CREATE TABLE IF NOT EXISTS `achievement_player` (
`AchievementID` int(11) NOT NULL,
`PlayerID` int(11) NOT NULL,
`unlocked` tinyint(4) NOT NULL,
PRIMARY KEY (`AchievementID`,`PlayerID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `actionlog`
--
CREATE TABLE IF NOT EXISTS `actionlog` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`time` int(11) NOT NULL,
`message` text NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=59435 ;
-- --------------------------------------------------------
--
-- Table structure for table `attribute`
--
CREATE TABLE IF NOT EXISTS `attribute` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Name` text NOT NULL,
`Description` text NOT NULL,
`Started` int(11) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=785 ;
-- --------------------------------------------------------
--
-- Table structure for table `config`
--
CREATE TABLE IF NOT EXISTS `config` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Name` text NOT NULL,
`Value` text NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
-- --------------------------------------------------------
--
-- Stand-in structure for view `objectives_achievements`
--
CREATE TABLE IF NOT EXISTS `objectives_achievements` (
`ID` int(11)
,`ANAME` text
,`Description` text
,`Name` text
,`RequiredValue` int(11)
);
-- --------------------------------------------------------
--
-- Table structure for table `player`
--
CREATE TABLE IF NOT EXISTS `player` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Name` text CHARACTER SET latin1 NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
-- --------------------------------------------------------
--
-- Table structure for table `stats`
--
CREATE TABLE IF NOT EXISTS `stats` (
`attributeID` int(11) NOT NULL,
`playerID` int(11) NOT NULL,
`state` int(20) NOT NULL,
PRIMARY KEY (`attributeID`,`playerID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Stand-in structure for view `unmapped_stats`
--
CREATE TABLE IF NOT EXISTS `unmapped_stats` (
`attributeID` int(11)
,`playerID` int(11)
,`state` int(20)
);
-- --------------------------------------------------------
--
-- Stand-in structure for view `view_player_stats`
--
CREATE TABLE IF NOT EXISTS `view_player_stats` (
`playerName` text
,`attributeName` text
,`value` int(20)
);
-- --------------------------------------------------------
--
-- Structure for view `objectives_achievements`
--
DROP TABLE IF EXISTS `objectives_achievements`;
CREATE ALGORITHM=UNDEFINED DEFINER=`d0141d48`@`%` SQL SECURITY DEFINER VIEW `objectives_achievements` AS select `achievements`.`ID` AS `ID`,`achievements`.`Name` AS `ANAME`,`achievements`.`Description` AS `Description`,`attribute`.`Name` AS `Name`,`achievement_objectives`.`RequiredValue` AS `RequiredValue` from ((`achievements` join `achievement_objectives`) join `attribute`) where ((`achievements`.`ID` = `achievement_objectives`.`AchievementID`) and (`attribute`.`ID` = `achievement_objectives`.`AttributeID`));
-- --------------------------------------------------------
--
-- Structure for view `unmapped_stats`
--
DROP TABLE IF EXISTS `unmapped_stats`;
CREATE ALGORITHM=UNDEFINED DEFINER=`d0141d48`@`%` SQL SECURITY DEFINER VIEW `unmapped_stats` AS select `stats`.`attributeID` AS `attributeID`,`stats`.`playerID` AS `playerID`,`stats`.`state` AS `state` from `stats` where (not(`stats`.`attributeID` in (select `attribute`.`ID` from `attribute`)));
-- --------------------------------------------------------
--
-- Structure for view `view_player_stats`
--
DROP TABLE IF EXISTS `view_player_stats`;
CREATE ALGORITHM=UNDEFINED DEFINER=`d0141d48`@`%` SQL SECURITY DEFINER VIEW `view_player_stats` AS select `player`.`Name` AS `playerName`,`attribute`.`Name` AS `attributeName`,`stats`.`state` AS `value` from ((`player` join `attribute`) join `stats`) where ((`player`.`ID` = `stats`.`playerID`) and (`attribute`.`ID` = `stats`.`attributeID`));
/*!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 */;