· 8 years ago · Feb 18, 2018, 08:40 PM
1-- MySQL Administrator dump 1.4
2--
3-- ------------------------------------------------------
4-- Server version 5.5.14
5
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
12/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
13/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
14/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
15
16
17--
18-- Create schema test
19--
20
21CREATE DATABASE IF NOT EXISTS test;
22USE test;
23
24--
25-- Definition of table `assemblage_components`
26--
27
28DROP TABLE IF EXISTS `assemblage_components`;
29CREATE TABLE `assemblage_components` (
30 `assemblage_id` int(11) NOT NULL,
31 `component_id` int(11) NOT NULL,
32 PRIMARY KEY (`assemblage_id`,`component_id`),
33 KEY `fk_assemblage_id` (`assemblage_id`),
34 KEY `fk_components_id` (`component_id`),
35 CONSTRAINT `fk_components_id` FOREIGN KEY (`component_id`) REFERENCES `components` (`component_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
36 CONSTRAINT `fk_assemblage_id` FOREIGN KEY (`assemblage_id`) REFERENCES `assemblages` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
37) ENGINE=InnoDB DEFAULT CHARSET=latin1;
38
39--
40-- Dumping data for table `assemblage_components`
41--
42
43/*!40000 ALTER TABLE `assemblage_components` DISABLE KEYS */;
44/*!40000 ALTER TABLE `assemblage_components` ENABLE KEYS */;
45
46
47--
48-- Definition of table `assemblages`
49--
50
51DROP TABLE IF EXISTS `assemblages`;
52CREATE TABLE `assemblages` (
53 `id` int(11) NOT NULL AUTO_INCREMENT,
54 `label` varchar(45) DEFAULT NULL,
55 `official_name` varchar(45) DEFAULT NULL,
56 `description` tinytext,
57 PRIMARY KEY (`id`)
58) ENGINE=InnoDB DEFAULT CHARSET=latin1;
59
60--
61-- Dumping data for table `assemblages`
62--
63
64/*!40000 ALTER TABLE `assemblages` DISABLE KEYS */;
65/*!40000 ALTER TABLE `assemblages` ENABLE KEYS */;
66
67
68--
69-- Definition of table `component_data_appearance`
70--
71
72DROP TABLE IF EXISTS `component_data_appearance`;
73CREATE TABLE `component_data_appearance` (
74 `component_data_id` int(11) NOT NULL,
75 `race` varchar(45) DEFAULT NULL,
76 `gender` varchar(45) DEFAULT NULL,
77 `name_iff` varchar(45) DEFAULT NULL,
78 `customization_string` text,
79 PRIMARY KEY (`component_data_id`)
80) ENGINE=InnoDB DEFAULT CHARSET=latin1;
81
82--
83-- Dumping data for table `component_data_appearance`
84--
85
86/*!40000 ALTER TABLE `component_data_appearance` DISABLE KEYS */;
87/*!40000 ALTER TABLE `component_data_appearance` ENABLE KEYS */;
88
89
90--
91-- Definition of table `component_data_combat`
92--
93
94DROP TABLE IF EXISTS `component_data_combat`;
95CREATE TABLE `component_data_combat` (
96 `component_data_id` bigint(20) NOT NULL,
97 `base_damage` int(11) DEFAULT NULL,
98 `base_multiplier` float DEFAULT NULL,
99 `base_speed` float DEFAULT NULL,
100 PRIMARY KEY (`component_data_id`)
101) ENGINE=InnoDB DEFAULT CHARSET=latin1;
102
103--
104-- Dumping data for table `component_data_combat`
105--
106
107/*!40000 ALTER TABLE `component_data_combat` DISABLE KEYS */;
108/*!40000 ALTER TABLE `component_data_combat` ENABLE KEYS */;
109
110
111--
112-- Definition of table `component_data_test_combat`
113--
114
115DROP TABLE IF EXISTS `component_data_test_combat`;
116CREATE TABLE `component_data_test_combat` (
117 `component_data_id` bigint(20) NOT NULL,
118 `combat1` float DEFAULT NULL,
119 `combat2` int(11) DEFAULT NULL,
120 `combat3` float DEFAULT NULL,
121 PRIMARY KEY (`component_data_id`)
122) ENGINE=InnoDB DEFAULT CHARSET=latin1;
123
124--
125-- Dumping data for table `component_data_test_combat`
126--
127
128/*!40000 ALTER TABLE `component_data_test_combat` DISABLE KEYS */;
129/*!40000 ALTER TABLE `component_data_test_combat` ENABLE KEYS */;
130
131
132--
133-- Definition of table `component_data_test_om`
134--
135
136DROP TABLE IF EXISTS `component_data_test_om`;
137CREATE TABLE `component_data_test_om` (
138 `component_data_id` bigint(20) NOT NULL,
139 `t` float DEFAULT NULL,
140 `t2` int(11) DEFAULT NULL,
141 `t3` bigint(20) DEFAULT NULL,
142 PRIMARY KEY (`component_data_id`)
143) ENGINE=InnoDB DEFAULT CHARSET=latin1;
144
145--
146-- Dumping data for table `component_data_test_om`
147--
148
149/*!40000 ALTER TABLE `component_data_test_om` DISABLE KEYS */;
150/*!40000 ALTER TABLE `component_data_test_om` ENABLE KEYS */;
151
152
153--
154-- Definition of table `component_data_transform`
155--
156
157DROP TABLE IF EXISTS `component_data_transform`;
158CREATE TABLE `component_data_transform` (
159 `component_data_id` bigint(20) NOT NULL,
160 `x` float DEFAULT NULL,
161 `y` float DEFAULT NULL,
162 `z` float DEFAULT NULL,
163 `oX` float DEFAULT NULL,
164 `oY` float DEFAULT NULL,
165 `oZ` float DEFAULT NULL,
166 `oW` float DEFAULT NULL,
167 `speed` float DEFAULT NULL,
168 PRIMARY KEY (`component_data_id`)
169) ENGINE=InnoDB DEFAULT CHARSET=latin1;
170
171--
172-- Dumping data for table `component_data_transform`
173--
174
175/*!40000 ALTER TABLE `component_data_transform` DISABLE KEYS */;
176/*!40000 ALTER TABLE `component_data_transform` ENABLE KEYS */;
177
178
179--
180-- Definition of table `components`
181--
182
183DROP TABLE IF EXISTS `components`;
184CREATE TABLE `components` (
185 `component_id` int(11) NOT NULL AUTO_INCREMENT,
186 `name` varchar(45) DEFAULT NULL,
187 `description` tinytext,
188 `table_name` varchar(45) DEFAULT NULL,
189 PRIMARY KEY (`component_id`)
190) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COMMENT='this has a list of which components are available and where to find their data.';
191
192--
193-- Dumping data for table `components`
194--
195
196/*!40000 ALTER TABLE `components` DISABLE KEYS */;
197INSERT INTO `components` (`component_id`,`name`,`description`,`table_name`) VALUES
198 (1,'Appearance Component','Appearance manages how an entity appears','component_data_appearance'),
199 (2,'Transform Component','Manages how the entity moves','component_data_transform');
200/*!40000 ALTER TABLE `components` ENABLE KEYS */;
201
202
203--
204-- Definition of table `entities`
205--
206
207DROP TABLE IF EXISTS `entities`;
208CREATE TABLE `entities` (
209 `entity_id` bigint(20) NOT NULL AUTO_INCREMENT,
210 `label` varchar(45) DEFAULT NULL COMMENT 'for debugging only',
211 PRIMARY KEY (`entity_id`)
212) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='master list of entities';
213
214--
215-- Dumping data for table `entities`
216--
217
218/*!40000 ALTER TABLE `entities` DISABLE KEYS */;
219/*!40000 ALTER TABLE `entities` ENABLE KEYS */;
220
221
222--
223-- Definition of table `entity_components`
224--
225
226DROP TABLE IF EXISTS `entity_components`;
227CREATE TABLE `entity_components` (
228 `entity_id` bigint(20) NOT NULL,
229 `component_id` int(11) DEFAULT NULL,
230 `component_data_id` bigint(20) DEFAULT NULL,
231 PRIMARY KEY (`entity_id`)
232) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Tells which components are in which entity';
233
234--
235-- Dumping data for table `entity_components`
236--
237
238/*!40000 ALTER TABLE `entity_components` DISABLE KEYS */;
239/*!40000 ALTER TABLE `entity_components` ENABLE KEYS */;
240
241
242
243
244/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
245/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
246/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
247/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
248/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
249/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
250/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;