1 |
9630
|
aaronmk
|
-- MySQL dump 10.13 Distrib 5.5.31, for debian-linux-gnu (x86_64)
|
2 |
8928
|
aaronmk
|
--
|
3 |
9630
|
aaronmk
|
-- Host: localhost Database: VegCore
|
4 |
8928
|
aaronmk
|
-- ------------------------------------------------------
|
5 |
|
|
-- Server version 5.5.31-0ubuntu0.12.04.1
|
6 |
|
|
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
7 |
|
|
/*!40103 SET TIME_ZONE='+00:00' */;
|
8 |
|
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
9 |
|
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
10 |
|
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,POSTGRESQL' */;
|
11 |
|
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
12 |
8336
|
aaronmk
|
|
13 |
8928
|
aaronmk
|
--
|
14 |
|
|
-- Table structure for table "aggregate_observation"
|
15 |
|
|
--
|
16 |
8336
|
aaronmk
|
|
17 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
18 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
19 |
8928
|
aaronmk
|
CREATE TABLE "aggregate_observation" (
|
20 |
|
|
"id" varbinary(767) NOT NULL,
|
21 |
|
|
"taxon_concept" varbinary(767) NOT NULL,
|
22 |
|
|
"traits" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
23 |
|
|
PRIMARY KEY ("id"),
|
24 |
|
|
KEY "fk_aggregate_observation_taxon_name1_idx" ("taxon_concept"),
|
25 |
9617
|
aaronmk
|
CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
26 |
|
|
CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
27 |
8928
|
aaronmk
|
);
|
28 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
29 |
8632
|
aaronmk
|
|
30 |
8928
|
aaronmk
|
--
|
31 |
|
|
-- Dumping data for table "aggregate_observation"
|
32 |
|
|
--
|
33 |
8336
|
aaronmk
|
|
34 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "aggregate_observation" DISABLE KEYS */;
|
35 |
|
|
/*!40000 ALTER TABLE "aggregate_observation" ENABLE KEYS */;
|
36 |
8336
|
aaronmk
|
|
37 |
8928
|
aaronmk
|
--
|
38 |
|
|
-- Table structure for table "base_class"
|
39 |
|
|
--
|
40 |
8632
|
aaronmk
|
|
41 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
42 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
43 |
8928
|
aaronmk
|
CREATE TABLE "base_class" (
|
44 |
|
|
"id" varbinary(767) NOT NULL,
|
45 |
|
|
"referenced_class" varbinary(767) NOT NULL,
|
46 |
|
|
PRIMARY KEY ("id"),
|
47 |
|
|
KEY "fk_base_class_referenced_class1_idx" ("referenced_class"),
|
48 |
9617
|
aaronmk
|
CONSTRAINT "fk_example_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
49 |
|
|
CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
50 |
8928
|
aaronmk
|
);
|
51 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
52 |
8336
|
aaronmk
|
|
53 |
8928
|
aaronmk
|
--
|
54 |
|
|
-- Dumping data for table "base_class"
|
55 |
|
|
--
|
56 |
8336
|
aaronmk
|
|
57 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "base_class" DISABLE KEYS */;
|
58 |
|
|
/*!40000 ALTER TABLE "base_class" ENABLE KEYS */;
|
59 |
8632
|
aaronmk
|
|
60 |
8928
|
aaronmk
|
--
|
61 |
|
|
-- Table structure for table "collection"
|
62 |
|
|
--
|
63 |
8623
|
aaronmk
|
|
64 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
65 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
66 |
8928
|
aaronmk
|
CREATE TABLE "collection" (
|
67 |
|
|
"id" varbinary(767) NOT NULL,
|
68 |
|
|
"institution" varbinary(767) NOT NULL,
|
69 |
|
|
"name" varbinary(767) NOT NULL,
|
70 |
|
|
PRIMARY KEY ("id"),
|
71 |
|
|
UNIQUE KEY "collection_unique" ("institution","name"),
|
72 |
|
|
KEY "fk_collection_organization1_idx" ("institution"),
|
73 |
|
|
KEY "fk_collection_source1_idx" ("id"),
|
74 |
9617
|
aaronmk
|
CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
75 |
|
|
CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
76 |
8928
|
aaronmk
|
);
|
77 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
78 |
8623
|
aaronmk
|
|
79 |
8928
|
aaronmk
|
--
|
80 |
|
|
-- Dumping data for table "collection"
|
81 |
|
|
--
|
82 |
8632
|
aaronmk
|
|
83 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "collection" DISABLE KEYS */;
|
84 |
|
|
/*!40000 ALTER TABLE "collection" ENABLE KEYS */;
|
85 |
8336
|
aaronmk
|
|
86 |
8928
|
aaronmk
|
--
|
87 |
|
|
-- Table structure for table "community"
|
88 |
|
|
--
|
89 |
8336
|
aaronmk
|
|
90 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
91 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
92 |
8928
|
aaronmk
|
CREATE TABLE "community" (
|
93 |
|
|
"id" varbinary(767) NOT NULL,
|
94 |
|
|
"name" varbinary(767) NOT NULL,
|
95 |
|
|
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
96 |
|
|
PRIMARY KEY ("id"),
|
97 |
|
|
CONSTRAINT "fk_community_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
98 |
|
|
);
|
99 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
100 |
8677
|
aaronmk
|
|
101 |
8928
|
aaronmk
|
--
|
102 |
|
|
-- Dumping data for table "community"
|
103 |
|
|
--
|
104 |
8677
|
aaronmk
|
|
105 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "community" DISABLE KEYS */;
|
106 |
|
|
/*!40000 ALTER TABLE "community" ENABLE KEYS */;
|
107 |
8677
|
aaronmk
|
|
108 |
8928
|
aaronmk
|
--
|
109 |
|
|
-- Table structure for table "coordinates"
|
110 |
|
|
--
|
111 |
8632
|
aaronmk
|
|
112 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
113 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
114 |
8928
|
aaronmk
|
CREATE TABLE "coordinates" (
|
115 |
|
|
"id" varbinary(767) NOT NULL,
|
116 |
|
|
"latitude_deg" varbinary(767) DEFAULT NULL,
|
117 |
|
|
"longitude_deg" varbinary(767) DEFAULT NULL,
|
118 |
|
|
PRIMARY KEY ("id")
|
119 |
|
|
);
|
120 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
121 |
8623
|
aaronmk
|
|
122 |
8928
|
aaronmk
|
--
|
123 |
|
|
-- Dumping data for table "coordinates"
|
124 |
|
|
--
|
125 |
8623
|
aaronmk
|
|
126 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "coordinates" DISABLE KEYS */;
|
127 |
|
|
/*!40000 ALTER TABLE "coordinates" ENABLE KEYS */;
|
128 |
8632
|
aaronmk
|
|
129 |
8928
|
aaronmk
|
--
|
130 |
|
|
-- Table structure for table "derived_class"
|
131 |
|
|
--
|
132 |
8554
|
aaronmk
|
|
133 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
134 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
135 |
8928
|
aaronmk
|
CREATE TABLE "derived_class" (
|
136 |
|
|
"id" varbinary(767) NOT NULL,
|
137 |
|
|
PRIMARY KEY ("id"),
|
138 |
|
|
CONSTRAINT "fk_derived_class_base_class1" FOREIGN KEY ("id") REFERENCES "base_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
139 |
|
|
);
|
140 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
141 |
8554
|
aaronmk
|
|
142 |
8928
|
aaronmk
|
--
|
143 |
|
|
-- Dumping data for table "derived_class"
|
144 |
|
|
--
|
145 |
8676
|
aaronmk
|
|
146 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "derived_class" DISABLE KEYS */;
|
147 |
|
|
/*!40000 ALTER TABLE "derived_class" ENABLE KEYS */;
|
148 |
8676
|
aaronmk
|
|
149 |
8928
|
aaronmk
|
--
|
150 |
|
|
-- Table structure for table "event"
|
151 |
|
|
--
|
152 |
8676
|
aaronmk
|
|
153 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
154 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
155 |
8928
|
aaronmk
|
CREATE TABLE "event" (
|
156 |
|
|
"id" varbinary(767) NOT NULL,
|
157 |
|
|
"parent" varbinary(767) NOT NULL,
|
158 |
|
|
"name" varbinary(767) DEFAULT NULL,
|
159 |
|
|
"date_range" varbinary(767) DEFAULT NULL,
|
160 |
|
|
"place" varbinary(767) DEFAULT NULL,
|
161 |
|
|
"method" varbinary(767) DEFAULT NULL,
|
162 |
|
|
PRIMARY KEY ("id"),
|
163 |
|
|
KEY "fk_event_place1_idx" ("place"),
|
164 |
|
|
KEY "fk_event1_idx" ("parent"),
|
165 |
|
|
KEY "fk_event_method1_idx" ("method"),
|
166 |
9617
|
aaronmk
|
CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
167 |
|
|
CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
168 |
8928
|
aaronmk
|
CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
169 |
9617
|
aaronmk
|
CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
170 |
8928
|
aaronmk
|
);
|
171 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
172 |
8632
|
aaronmk
|
|
173 |
8928
|
aaronmk
|
--
|
174 |
|
|
-- Dumping data for table "event"
|
175 |
|
|
--
|
176 |
8554
|
aaronmk
|
|
177 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "event" DISABLE KEYS */;
|
178 |
|
|
/*!40000 ALTER TABLE "event" ENABLE KEYS */;
|
179 |
8554
|
aaronmk
|
|
180 |
8928
|
aaronmk
|
--
|
181 |
|
|
-- Table structure for table "event_participant"
|
182 |
|
|
--
|
183 |
8632
|
aaronmk
|
|
184 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
185 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
186 |
8928
|
aaronmk
|
CREATE TABLE "event_participant" (
|
187 |
|
|
"event" varbinary(767) NOT NULL,
|
188 |
|
|
"party" varbinary(767) NOT NULL,
|
189 |
|
|
"sort_order" int(11) DEFAULT NULL,
|
190 |
|
|
PRIMARY KEY ("event","party"),
|
191 |
|
|
KEY "fk_event_has_party_party1_idx" ("party"),
|
192 |
|
|
KEY "fk_event_has_party_event1_idx" ("event"),
|
193 |
|
|
CONSTRAINT "fk_event_has_party_event1" FOREIGN KEY ("event") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
194 |
|
|
CONSTRAINT "fk_event_has_party_party1" FOREIGN KEY ("party") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
195 |
|
|
);
|
196 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
197 |
8552
|
aaronmk
|
|
198 |
8928
|
aaronmk
|
--
|
199 |
|
|
-- Dumping data for table "event_participant"
|
200 |
|
|
--
|
201 |
8552
|
aaronmk
|
|
202 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "event_participant" DISABLE KEYS */;
|
203 |
|
|
/*!40000 ALTER TABLE "event_participant" ENABLE KEYS */;
|
204 |
8632
|
aaronmk
|
|
205 |
8928
|
aaronmk
|
--
|
206 |
|
|
-- Table structure for table "geological_context"
|
207 |
|
|
--
|
208 |
8521
|
aaronmk
|
|
209 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
210 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
211 |
8928
|
aaronmk
|
CREATE TABLE "geological_context" (
|
212 |
|
|
"id" varbinary(767) NOT NULL,
|
213 |
|
|
"name" varbinary(767) NOT NULL,
|
214 |
|
|
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
215 |
|
|
PRIMARY KEY ("id"),
|
216 |
|
|
CONSTRAINT "fk_geological_context_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
217 |
|
|
);
|
218 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
219 |
8521
|
aaronmk
|
|
220 |
8928
|
aaronmk
|
--
|
221 |
|
|
-- Dumping data for table "geological_context"
|
222 |
|
|
--
|
223 |
8632
|
aaronmk
|
|
224 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "geological_context" DISABLE KEYS */;
|
225 |
|
|
/*!40000 ALTER TABLE "geological_context" ENABLE KEYS */;
|
226 |
8336
|
aaronmk
|
|
227 |
8928
|
aaronmk
|
--
|
228 |
|
|
-- Table structure for table "geovalidation"
|
229 |
|
|
--
|
230 |
8336
|
aaronmk
|
|
231 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
232 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
233 |
8928
|
aaronmk
|
CREATE TABLE "geovalidation" (
|
234 |
|
|
"id" varbinary(767) NOT NULL,
|
235 |
|
|
"geovalid" tinyint(1) NOT NULL,
|
236 |
|
|
"lat_long_domain_valid" tinyint(1) NOT NULL,
|
237 |
|
|
"lat_long_in_ranks" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
238 |
|
|
PRIMARY KEY ("id"),
|
239 |
|
|
CONSTRAINT "fk_geovalidation_validatable_place1" FOREIGN KEY ("id") REFERENCES "validatable_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
240 |
|
|
);
|
241 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
242 |
8632
|
aaronmk
|
|
243 |
8928
|
aaronmk
|
--
|
244 |
|
|
-- Dumping data for table "geovalidation"
|
245 |
|
|
--
|
246 |
8567
|
aaronmk
|
|
247 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "geovalidation" DISABLE KEYS */;
|
248 |
|
|
/*!40000 ALTER TABLE "geovalidation" ENABLE KEYS */;
|
249 |
8567
|
aaronmk
|
|
250 |
8928
|
aaronmk
|
--
|
251 |
|
|
-- Table structure for table "individual"
|
252 |
|
|
--
|
253 |
8632
|
aaronmk
|
|
254 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
255 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
256 |
8928
|
aaronmk
|
CREATE TABLE "individual" (
|
257 |
|
|
"id" varbinary(767) NOT NULL,
|
258 |
|
|
"tag" varbinary(767) DEFAULT NULL,
|
259 |
|
|
PRIMARY KEY ("id"),
|
260 |
|
|
CONSTRAINT "fk_individual_record1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
261 |
|
|
);
|
262 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
263 |
8336
|
aaronmk
|
|
264 |
8928
|
aaronmk
|
--
|
265 |
|
|
-- Dumping data for table "individual"
|
266 |
|
|
--
|
267 |
8336
|
aaronmk
|
|
268 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "individual" DISABLE KEYS */;
|
269 |
|
|
/*!40000 ALTER TABLE "individual" ENABLE KEYS */;
|
270 |
8632
|
aaronmk
|
|
271 |
8928
|
aaronmk
|
--
|
272 |
|
|
-- Table structure for table "individual_observation"
|
273 |
|
|
--
|
274 |
8336
|
aaronmk
|
|
275 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
276 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
277 |
8928
|
aaronmk
|
CREATE TABLE "individual_observation" (
|
278 |
|
|
"id" varbinary(767) NOT NULL,
|
279 |
|
|
"individual" varbinary(767) DEFAULT NULL,
|
280 |
|
|
"code" varbinary(767) DEFAULT NULL,
|
281 |
|
|
"traits" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
282 |
|
|
PRIMARY KEY ("id"),
|
283 |
|
|
KEY "fk_individual_observation_individual1_idx" ("individual"),
|
284 |
9617
|
aaronmk
|
CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
285 |
|
|
CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
286 |
8928
|
aaronmk
|
);
|
287 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
288 |
8336
|
aaronmk
|
|
289 |
8928
|
aaronmk
|
--
|
290 |
|
|
-- Dumping data for table "individual_observation"
|
291 |
|
|
--
|
292 |
8632
|
aaronmk
|
|
293 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "individual_observation" DISABLE KEYS */;
|
294 |
|
|
/*!40000 ALTER TABLE "individual_observation" ENABLE KEYS */;
|
295 |
8336
|
aaronmk
|
|
296 |
8928
|
aaronmk
|
--
|
297 |
|
|
-- Table structure for table "method"
|
298 |
|
|
--
|
299 |
8336
|
aaronmk
|
|
300 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
301 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
302 |
8928
|
aaronmk
|
CREATE TABLE "method" (
|
303 |
|
|
"id" varbinary(767) NOT NULL,
|
304 |
|
|
"parent" varbinary(767) NOT NULL,
|
305 |
|
|
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
306 |
|
|
PRIMARY KEY ("id"),
|
307 |
|
|
KEY "fk_method_method1_idx" ("parent"),
|
308 |
9617
|
aaronmk
|
CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
309 |
|
|
CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
310 |
8928
|
aaronmk
|
);
|
311 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
312 |
8632
|
aaronmk
|
|
313 |
8928
|
aaronmk
|
--
|
314 |
|
|
-- Dumping data for table "method"
|
315 |
|
|
--
|
316 |
8623
|
aaronmk
|
|
317 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "method" DISABLE KEYS */;
|
318 |
|
|
/*!40000 ALTER TABLE "method" ENABLE KEYS */;
|
319 |
8623
|
aaronmk
|
|
320 |
8928
|
aaronmk
|
--
|
321 |
|
|
-- Table structure for table "organization"
|
322 |
|
|
--
|
323 |
8632
|
aaronmk
|
|
324 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
325 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
326 |
8928
|
aaronmk
|
CREATE TABLE "organization" (
|
327 |
|
|
"id" varbinary(767) NOT NULL,
|
328 |
|
|
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
329 |
|
|
PRIMARY KEY ("id"),
|
330 |
|
|
CONSTRAINT "fk_organization_party1" FOREIGN KEY ("id") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
331 |
|
|
);
|
332 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
333 |
8581
|
aaronmk
|
|
334 |
8928
|
aaronmk
|
--
|
335 |
|
|
-- Dumping data for table "organization"
|
336 |
|
|
--
|
337 |
8581
|
aaronmk
|
|
338 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "organization" DISABLE KEYS */;
|
339 |
|
|
/*!40000 ALTER TABLE "organization" ENABLE KEYS */;
|
340 |
8632
|
aaronmk
|
|
341 |
8928
|
aaronmk
|
--
|
342 |
|
|
-- Table structure for table "parsed_taxon_assertion"
|
343 |
|
|
--
|
344 |
8581
|
aaronmk
|
|
345 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
346 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
347 |
8928
|
aaronmk
|
CREATE TABLE "parsed_taxon_assertion" (
|
348 |
|
|
"id" varbinary(767) NOT NULL,
|
349 |
|
|
"matched_taxon_concept" varbinary(767) DEFAULT NULL,
|
350 |
|
|
"match_score" float DEFAULT NULL,
|
351 |
|
|
"match_info" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
352 |
|
|
PRIMARY KEY ("id"),
|
353 |
|
|
KEY "fk_parsed_taxon_assertion_taxon_name1_idx" ("matched_taxon_concept"),
|
354 |
|
|
CONSTRAINT "fk_matched_taxon_qualified_taxon10" FOREIGN KEY ("id") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
355 |
|
|
CONSTRAINT "fk_parsed_taxon_assertion_taxon_name1" FOREIGN KEY ("matched_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
356 |
|
|
);
|
357 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
358 |
8581
|
aaronmk
|
|
359 |
8928
|
aaronmk
|
--
|
360 |
|
|
-- Dumping data for table "parsed_taxon_assertion"
|
361 |
|
|
--
|
362 |
8632
|
aaronmk
|
|
363 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "parsed_taxon_assertion" DISABLE KEYS */;
|
364 |
|
|
/*!40000 ALTER TABLE "parsed_taxon_assertion" ENABLE KEYS */;
|
365 |
8336
|
aaronmk
|
|
366 |
8928
|
aaronmk
|
--
|
367 |
|
|
-- Table structure for table "party"
|
368 |
|
|
--
|
369 |
8336
|
aaronmk
|
|
370 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
371 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
372 |
8928
|
aaronmk
|
CREATE TABLE "party" (
|
373 |
|
|
"id" varbinary(767) NOT NULL,
|
374 |
|
|
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
375 |
|
|
PRIMARY KEY ("id"),
|
376 |
|
|
CONSTRAINT "fk_collection_source10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
377 |
|
|
);
|
378 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
379 |
8632
|
aaronmk
|
|
380 |
8928
|
aaronmk
|
--
|
381 |
|
|
-- Dumping data for table "party"
|
382 |
|
|
--
|
383 |
8336
|
aaronmk
|
|
384 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "party" DISABLE KEYS */;
|
385 |
|
|
/*!40000 ALTER TABLE "party" ENABLE KEYS */;
|
386 |
8336
|
aaronmk
|
|
387 |
8928
|
aaronmk
|
--
|
388 |
|
|
-- Table structure for table "place"
|
389 |
|
|
--
|
390 |
8632
|
aaronmk
|
|
391 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
392 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
393 |
8928
|
aaronmk
|
CREATE TABLE "place" (
|
394 |
|
|
"id" varbinary(767) NOT NULL,
|
395 |
|
|
"parent" varbinary(767) NOT NULL,
|
396 |
|
|
"coordinates" varbinary(767) DEFAULT NULL,
|
397 |
|
|
"path" varbinary(767) DEFAULT NULL,
|
398 |
|
|
"locality" varbinary(767) DEFAULT NULL,
|
399 |
|
|
PRIMARY KEY ("id"),
|
400 |
|
|
KEY "fk_place_coordinates1_idx" ("coordinates"),
|
401 |
|
|
KEY "fk_place1_idx" ("parent"),
|
402 |
|
|
KEY "fk_place_place_path1_idx" ("path"),
|
403 |
9617
|
aaronmk
|
CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
404 |
|
|
CONSTRAINT "fk_place_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
405 |
8928
|
aaronmk
|
CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
406 |
9617
|
aaronmk
|
CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
407 |
8928
|
aaronmk
|
);
|
408 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
409 |
8336
|
aaronmk
|
|
410 |
8928
|
aaronmk
|
--
|
411 |
|
|
-- Dumping data for table "place"
|
412 |
|
|
--
|
413 |
8336
|
aaronmk
|
|
414 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "place" DISABLE KEYS */;
|
415 |
|
|
/*!40000 ALTER TABLE "place" ENABLE KEYS */;
|
416 |
8632
|
aaronmk
|
|
417 |
8928
|
aaronmk
|
--
|
418 |
|
|
-- Table structure for table "place_observation"
|
419 |
|
|
--
|
420 |
8573
|
aaronmk
|
|
421 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
422 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
423 |
8928
|
aaronmk
|
CREATE TABLE "place_observation" (
|
424 |
|
|
"id" varbinary(767) NOT NULL,
|
425 |
|
|
"place" varbinary(767) NOT NULL,
|
426 |
|
|
"elevation_m" double DEFAULT NULL,
|
427 |
|
|
"slope_incline_deg" double DEFAULT NULL,
|
428 |
|
|
"slope_direction_deg_N" double DEFAULT NULL,
|
429 |
|
|
"geological_context" varbinary(767) DEFAULT NULL,
|
430 |
|
|
"community" varbinary(767) DEFAULT NULL,
|
431 |
|
|
"observations" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
432 |
|
|
PRIMARY KEY ("id"),
|
433 |
|
|
KEY "fk_place_observation_place1_idx" ("place"),
|
434 |
|
|
KEY "fk_place_observation_geological_context1_idx" ("geological_context"),
|
435 |
|
|
KEY "fk_place_observation_community1_idx" ("community"),
|
436 |
|
|
KEY "fk_place_observation_event1_idx" ("id"),
|
437 |
9617
|
aaronmk
|
CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
438 |
|
|
CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
439 |
8928
|
aaronmk
|
CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
440 |
9617
|
aaronmk
|
CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
441 |
8928
|
aaronmk
|
);
|
442 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
443 |
8573
|
aaronmk
|
|
444 |
8928
|
aaronmk
|
--
|
445 |
|
|
-- Dumping data for table "place_observation"
|
446 |
|
|
--
|
447 |
8632
|
aaronmk
|
|
448 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "place_observation" DISABLE KEYS */;
|
449 |
|
|
/*!40000 ALTER TABLE "place_observation" ENABLE KEYS */;
|
450 |
8336
|
aaronmk
|
|
451 |
8928
|
aaronmk
|
--
|
452 |
|
|
-- Table structure for table "place_path"
|
453 |
|
|
--
|
454 |
8336
|
aaronmk
|
|
455 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
456 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
457 |
8928
|
aaronmk
|
CREATE TABLE "place_path" (
|
458 |
|
|
"id" varbinary(767) NOT NULL,
|
459 |
|
|
"continent" varbinary(767) DEFAULT NULL,
|
460 |
|
|
"country" varbinary(767) DEFAULT NULL,
|
461 |
|
|
"state_province" varbinary(767) DEFAULT NULL,
|
462 |
|
|
"county" varbinary(767) DEFAULT NULL,
|
463 |
|
|
"municipality" varbinary(767) DEFAULT NULL,
|
464 |
|
|
"ranks" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
465 |
|
|
PRIMARY KEY ("id")
|
466 |
|
|
);
|
467 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
468 |
8632
|
aaronmk
|
|
469 |
8928
|
aaronmk
|
--
|
470 |
|
|
-- Dumping data for table "place_path"
|
471 |
|
|
--
|
472 |
8336
|
aaronmk
|
|
473 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "place_path" DISABLE KEYS */;
|
474 |
|
|
/*!40000 ALTER TABLE "place_path" ENABLE KEYS */;
|
475 |
8336
|
aaronmk
|
|
476 |
8928
|
aaronmk
|
--
|
477 |
|
|
-- Table structure for table "plot"
|
478 |
|
|
--
|
479 |
8632
|
aaronmk
|
|
480 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
481 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
482 |
8928
|
aaronmk
|
CREATE TABLE "plot" (
|
483 |
|
|
"id" varbinary(767) NOT NULL,
|
484 |
|
|
"name" varbinary(767) DEFAULT NULL,
|
485 |
|
|
"area_m2" double DEFAULT NULL,
|
486 |
|
|
"bounding_box" varbinary(767) DEFAULT NULL,
|
487 |
|
|
PRIMARY KEY ("id"),
|
488 |
|
|
CONSTRAINT "fk_subplot_place1" FOREIGN KEY ("id") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
489 |
|
|
);
|
490 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
491 |
8336
|
aaronmk
|
|
492 |
8928
|
aaronmk
|
--
|
493 |
|
|
-- Dumping data for table "plot"
|
494 |
|
|
--
|
495 |
8336
|
aaronmk
|
|
496 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "plot" DISABLE KEYS */;
|
497 |
|
|
/*!40000 ALTER TABLE "plot" ENABLE KEYS */;
|
498 |
8632
|
aaronmk
|
|
499 |
8928
|
aaronmk
|
--
|
500 |
|
|
-- Table structure for table "project"
|
501 |
|
|
--
|
502 |
8336
|
aaronmk
|
|
503 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
504 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
505 |
8928
|
aaronmk
|
CREATE TABLE "project" (
|
506 |
|
|
"id" varbinary(767) NOT NULL,
|
507 |
|
|
"name" varbinary(767) NOT NULL,
|
508 |
|
|
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
509 |
|
|
PRIMARY KEY ("id"),
|
510 |
|
|
CONSTRAINT "fk_project_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
511 |
|
|
);
|
512 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
513 |
8336
|
aaronmk
|
|
514 |
8928
|
aaronmk
|
--
|
515 |
|
|
-- Dumping data for table "project"
|
516 |
|
|
--
|
517 |
8632
|
aaronmk
|
|
518 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "project" DISABLE KEYS */;
|
519 |
|
|
/*!40000 ALTER TABLE "project" ENABLE KEYS */;
|
520 |
8336
|
aaronmk
|
|
521 |
8928
|
aaronmk
|
--
|
522 |
|
|
-- Table structure for table "record"
|
523 |
|
|
--
|
524 |
8336
|
aaronmk
|
|
525 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
526 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
527 |
8928
|
aaronmk
|
CREATE TABLE "record" (
|
528 |
|
|
"id" varbinary(767) NOT NULL,
|
529 |
|
|
"source" varbinary(767) NOT NULL,
|
530 |
|
|
"source_id_scope" varbinary(767) DEFAULT NULL,
|
531 |
|
|
"source_record_id" varbinary(767) DEFAULT NULL,
|
532 |
|
|
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
533 |
|
|
PRIMARY KEY ("id"),
|
534 |
|
|
UNIQUE KEY "record_unique" ("source","source_id_scope","source_record_id"),
|
535 |
|
|
KEY "fk_record_source1_idx" ("source"),
|
536 |
|
|
CONSTRAINT "fk_record_source1" FOREIGN KEY ("source") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
537 |
|
|
);
|
538 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
539 |
8632
|
aaronmk
|
|
540 |
8928
|
aaronmk
|
--
|
541 |
|
|
-- Dumping data for table "record"
|
542 |
|
|
--
|
543 |
8532
|
aaronmk
|
|
544 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "record" DISABLE KEYS */;
|
545 |
|
|
/*!40000 ALTER TABLE "record" ENABLE KEYS */;
|
546 |
8532
|
aaronmk
|
|
547 |
8928
|
aaronmk
|
--
|
548 |
|
|
-- Table structure for table "referenced_class"
|
549 |
|
|
--
|
550 |
8632
|
aaronmk
|
|
551 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
552 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
553 |
8928
|
aaronmk
|
CREATE TABLE "referenced_class" (
|
554 |
|
|
"id" varbinary(767) NOT NULL,
|
555 |
|
|
PRIMARY KEY ("id"),
|
556 |
|
|
CONSTRAINT "fk_example_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
557 |
|
|
);
|
558 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
559 |
8565
|
aaronmk
|
|
560 |
8928
|
aaronmk
|
--
|
561 |
|
|
-- Dumping data for table "referenced_class"
|
562 |
|
|
--
|
563 |
8565
|
aaronmk
|
|
564 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "referenced_class" DISABLE KEYS */;
|
565 |
|
|
/*!40000 ALTER TABLE "referenced_class" ENABLE KEYS */;
|
566 |
8632
|
aaronmk
|
|
567 |
8928
|
aaronmk
|
--
|
568 |
|
|
-- Table structure for table "relationship"
|
569 |
|
|
--
|
570 |
8623
|
aaronmk
|
|
571 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
572 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
573 |
8928
|
aaronmk
|
CREATE TABLE "relationship" (
|
574 |
|
|
"id" varbinary(767) NOT NULL,
|
575 |
|
|
"record" varbinary(767) NOT NULL,
|
576 |
|
|
"related_record" varbinary(767) NOT NULL,
|
577 |
|
|
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
578 |
|
|
PRIMARY KEY ("id"),
|
579 |
|
|
KEY "fk_relationship_record1_idx" ("record"),
|
580 |
|
|
KEY "fk_relationship_related_record_idx" ("related_record"),
|
581 |
|
|
CONSTRAINT "fk_relationship_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
582 |
|
|
CONSTRAINT "fk_relationship_record2" FOREIGN KEY ("record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
583 |
|
|
CONSTRAINT "fk_relationship_related_record" FOREIGN KEY ("related_record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
584 |
|
|
);
|
585 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
586 |
8623
|
aaronmk
|
|
587 |
8928
|
aaronmk
|
--
|
588 |
|
|
-- Dumping data for table "relationship"
|
589 |
|
|
--
|
590 |
8632
|
aaronmk
|
|
591 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "relationship" DISABLE KEYS */;
|
592 |
|
|
/*!40000 ALTER TABLE "relationship" ENABLE KEYS */;
|
593 |
8623
|
aaronmk
|
|
594 |
8928
|
aaronmk
|
--
|
595 |
|
|
-- Table structure for table "soil_observation"
|
596 |
|
|
--
|
597 |
8623
|
aaronmk
|
|
598 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
599 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
600 |
8928
|
aaronmk
|
CREATE TABLE "soil_observation" (
|
601 |
|
|
"id" varbinary(767) NOT NULL,
|
602 |
|
|
"observations" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
603 |
|
|
PRIMARY KEY ("id"),
|
604 |
|
|
CONSTRAINT "fk_soil_observation_place_observation1" FOREIGN KEY ("id") REFERENCES "place_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
605 |
|
|
);
|
606 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
607 |
8632
|
aaronmk
|
|
608 |
8928
|
aaronmk
|
--
|
609 |
|
|
-- Dumping data for table "soil_observation"
|
610 |
|
|
--
|
611 |
8623
|
aaronmk
|
|
612 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "soil_observation" DISABLE KEYS */;
|
613 |
|
|
/*!40000 ALTER TABLE "soil_observation" ENABLE KEYS */;
|
614 |
8623
|
aaronmk
|
|
615 |
8928
|
aaronmk
|
--
|
616 |
|
|
-- Table structure for table "source"
|
617 |
|
|
--
|
618 |
8632
|
aaronmk
|
|
619 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
620 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
621 |
8928
|
aaronmk
|
CREATE TABLE "source" (
|
622 |
|
|
"id" varbinary(767) NOT NULL,
|
623 |
|
|
"parent" varbinary(767) NOT NULL,
|
624 |
|
|
"name" varbinary(767) NOT NULL,
|
625 |
|
|
"first_publisher" varbinary(767) DEFAULT NULL,
|
626 |
|
|
"owner" varbinary(767) DEFAULT NULL,
|
627 |
|
|
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
628 |
|
|
PRIMARY KEY ("id"),
|
629 |
|
|
UNIQUE KEY "source_unique" ("parent","name"),
|
630 |
|
|
KEY "fk_source1_idx" ("parent"),
|
631 |
9617
|
aaronmk
|
KEY "fk_source_party1_idx" ("owner"),
|
632 |
8928
|
aaronmk
|
KEY "fk_source_party2_idx" ("first_publisher"),
|
633 |
|
|
CONSTRAINT "fk_source1" FOREIGN KEY ("parent") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
634 |
|
|
CONSTRAINT "fk_source_party1" FOREIGN KEY ("owner") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
635 |
|
|
CONSTRAINT "fk_source_party2" FOREIGN KEY ("first_publisher") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
636 |
|
|
);
|
637 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
638 |
8336
|
aaronmk
|
|
639 |
8928
|
aaronmk
|
--
|
640 |
|
|
-- Dumping data for table "source"
|
641 |
|
|
--
|
642 |
8336
|
aaronmk
|
|
643 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "source" DISABLE KEYS */;
|
644 |
|
|
/*!40000 ALTER TABLE "source" ENABLE KEYS */;
|
645 |
8632
|
aaronmk
|
|
646 |
8928
|
aaronmk
|
--
|
647 |
|
|
-- Table structure for table "specimen"
|
648 |
|
|
--
|
649 |
8336
|
aaronmk
|
|
650 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
651 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
652 |
8928
|
aaronmk
|
CREATE TABLE "specimen" (
|
653 |
|
|
"id" varbinary(767) NOT NULL,
|
654 |
|
|
"individual" varbinary(767) DEFAULT NULL,
|
655 |
|
|
"code_in_individual" varbinary(767) DEFAULT NULL,
|
656 |
|
|
"collection_event" varbinary(767) DEFAULT NULL,
|
657 |
|
|
"orig_collection" varbinary(767) DEFAULT NULL,
|
658 |
|
|
"barcode" varbinary(767) DEFAULT NULL,
|
659 |
|
|
"accession_number" varbinary(767) DEFAULT NULL,
|
660 |
|
|
"current_collection" varbinary(767) DEFAULT NULL,
|
661 |
|
|
"owner_collection" varbinary(767) DEFAULT NULL,
|
662 |
|
|
PRIMARY KEY ("id"),
|
663 |
|
|
UNIQUE KEY "specimen_unique_in_individual" ("individual","code_in_individual"),
|
664 |
|
|
UNIQUE KEY "specimen_unique_by_collection_event" ("collection_event"),
|
665 |
|
|
UNIQUE KEY "specimen_unique_in_collection_by_barcode" ("orig_collection","barcode"),
|
666 |
|
|
UNIQUE KEY "specimen_unique_in_collection_by_accession_number" ("orig_collection","accession_number"),
|
667 |
|
|
KEY "fk_specimen_collection1_idx" ("orig_collection"),
|
668 |
|
|
KEY "fk_specimen_taxon_observation1_idx" ("collection_event"),
|
669 |
|
|
KEY "fk_specimen_individual1_idx" ("individual"),
|
670 |
|
|
KEY "fk_specimen_collection2_idx" ("current_collection"),
|
671 |
|
|
KEY "fk_specimen_organization3_idx" ("owner_collection"),
|
672 |
9617
|
aaronmk
|
CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
673 |
8928
|
aaronmk
|
CONSTRAINT "fk_specimen_collection1" FOREIGN KEY ("orig_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
674 |
|
|
CONSTRAINT "fk_specimen_organization3" FOREIGN KEY ("owner_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
675 |
|
|
CONSTRAINT "fk_specimen_taxon_observation1" FOREIGN KEY ("collection_event") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
676 |
9617
|
aaronmk
|
CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
677 |
|
|
CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
678 |
8928
|
aaronmk
|
);
|
679 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
680 |
8521
|
aaronmk
|
|
681 |
8928
|
aaronmk
|
--
|
682 |
|
|
-- Dumping data for table "specimen"
|
683 |
|
|
--
|
684 |
8632
|
aaronmk
|
|
685 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "specimen" DISABLE KEYS */;
|
686 |
|
|
/*!40000 ALTER TABLE "specimen" ENABLE KEYS */;
|
687 |
8521
|
aaronmk
|
|
688 |
8928
|
aaronmk
|
--
|
689 |
|
|
-- Table structure for table "specimen_observation"
|
690 |
|
|
--
|
691 |
8521
|
aaronmk
|
|
692 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
693 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
694 |
8928
|
aaronmk
|
CREATE TABLE "specimen_observation" (
|
695 |
|
|
"id" varbinary(767) NOT NULL,
|
696 |
|
|
"specimen" varbinary(767) NOT NULL,
|
697 |
|
|
"traits" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
698 |
|
|
PRIMARY KEY ("id"),
|
699 |
|
|
KEY "fk_specimen_observation_specimen1_idx" ("specimen"),
|
700 |
9617
|
aaronmk
|
CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
701 |
|
|
CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
702 |
8928
|
aaronmk
|
);
|
703 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
704 |
8632
|
aaronmk
|
|
705 |
8928
|
aaronmk
|
--
|
706 |
|
|
-- Dumping data for table "specimen_observation"
|
707 |
|
|
--
|
708 |
8521
|
aaronmk
|
|
709 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "specimen_observation" DISABLE KEYS */;
|
710 |
|
|
/*!40000 ALTER TABLE "specimen_observation" ENABLE KEYS */;
|
711 |
8521
|
aaronmk
|
|
712 |
8928
|
aaronmk
|
--
|
713 |
9617
|
aaronmk
|
-- Table structure for table "specimenholder_institution"
|
714 |
|
|
--
|
715 |
|
|
|
716 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
717 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
718 |
9617
|
aaronmk
|
CREATE TABLE "specimenholder_institution" (
|
719 |
|
|
"specimen" varbinary(767) NOT NULL,
|
720 |
|
|
"institution" varbinary(767) NOT NULL,
|
721 |
|
|
"sort_order" int(11) DEFAULT NULL,
|
722 |
|
|
PRIMARY KEY ("specimen","institution"),
|
723 |
|
|
KEY "fk_specimen_has_organization_organization1_idx" ("institution"),
|
724 |
|
|
KEY "fk_specimen_has_organization_specimen1_idx" ("specimen"),
|
725 |
|
|
CONSTRAINT "fk_specimen_has_organization_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
726 |
|
|
CONSTRAINT "fk_specimen_has_organization_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
727 |
|
|
);
|
728 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
729 |
9617
|
aaronmk
|
|
730 |
|
|
--
|
731 |
|
|
-- Dumping data for table "specimenholder_institution"
|
732 |
|
|
--
|
733 |
|
|
|
734 |
|
|
/*!40000 ALTER TABLE "specimenholder_institution" DISABLE KEYS */;
|
735 |
|
|
/*!40000 ALTER TABLE "specimenholder_institution" ENABLE KEYS */;
|
736 |
|
|
|
737 |
|
|
--
|
738 |
8928
|
aaronmk
|
-- Table structure for table "stem"
|
739 |
|
|
--
|
740 |
8632
|
aaronmk
|
|
741 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
742 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
743 |
8928
|
aaronmk
|
CREATE TABLE "stem" (
|
744 |
|
|
"id" varbinary(767) NOT NULL,
|
745 |
|
|
"individual" varbinary(767) NOT NULL,
|
746 |
|
|
PRIMARY KEY ("id"),
|
747 |
|
|
KEY "fk_stem_individual1_idx" ("individual"),
|
748 |
|
|
CONSTRAINT "fk_stem_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
749 |
|
|
CONSTRAINT "fk_stem_individual2" FOREIGN KEY ("id") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
750 |
|
|
);
|
751 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
752 |
8521
|
aaronmk
|
|
753 |
8928
|
aaronmk
|
--
|
754 |
|
|
-- Dumping data for table "stem"
|
755 |
|
|
--
|
756 |
8533
|
aaronmk
|
|
757 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "stem" DISABLE KEYS */;
|
758 |
|
|
/*!40000 ALTER TABLE "stem" ENABLE KEYS */;
|
759 |
8632
|
aaronmk
|
|
760 |
8928
|
aaronmk
|
--
|
761 |
|
|
-- Table structure for table "stem_observation"
|
762 |
|
|
--
|
763 |
8561
|
aaronmk
|
|
764 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
765 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
766 |
8928
|
aaronmk
|
CREATE TABLE "stem_observation" (
|
767 |
|
|
"id" varbinary(767) NOT NULL,
|
768 |
|
|
"individual_observation" varbinary(767) NOT NULL,
|
769 |
|
|
"stem" varbinary(767) DEFAULT NULL,
|
770 |
|
|
"traits" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
771 |
|
|
PRIMARY KEY ("id"),
|
772 |
|
|
UNIQUE KEY "stem_observation_unique" ("individual_observation","stem"),
|
773 |
|
|
KEY "fk_stem_observation_individual_observation1_idx" ("individual_observation"),
|
774 |
|
|
KEY "fk_stem_observation_stem1_idx" ("stem"),
|
775 |
|
|
CONSTRAINT "fk_stem_observation_individual_observation1" FOREIGN KEY ("individual_observation") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
776 |
9617
|
aaronmk
|
CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
777 |
|
|
CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
778 |
8928
|
aaronmk
|
);
|
779 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
780 |
8567
|
aaronmk
|
|
781 |
8928
|
aaronmk
|
--
|
782 |
|
|
-- Dumping data for table "stem_observation"
|
783 |
|
|
--
|
784 |
8632
|
aaronmk
|
|
785 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "stem_observation" DISABLE KEYS */;
|
786 |
|
|
/*!40000 ALTER TABLE "stem_observation" ENABLE KEYS */;
|
787 |
8567
|
aaronmk
|
|
788 |
8928
|
aaronmk
|
--
|
789 |
|
|
-- Table structure for table "stratum"
|
790 |
|
|
--
|
791 |
8573
|
aaronmk
|
|
792 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
793 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
794 |
8928
|
aaronmk
|
CREATE TABLE "stratum" (
|
795 |
|
|
"id" varbinary(767) NOT NULL,
|
796 |
|
|
"name" varbinary(767) NOT NULL,
|
797 |
|
|
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
798 |
|
|
PRIMARY KEY ("id"),
|
799 |
|
|
CONSTRAINT "fk_place_path_record10" FOREIGN KEY ("id") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
800 |
|
|
);
|
801 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
802 |
8632
|
aaronmk
|
|
803 |
8928
|
aaronmk
|
--
|
804 |
|
|
-- Dumping data for table "stratum"
|
805 |
|
|
--
|
806 |
8573
|
aaronmk
|
|
807 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "stratum" DISABLE KEYS */;
|
808 |
|
|
/*!40000 ALTER TABLE "stratum" ENABLE KEYS */;
|
809 |
8581
|
aaronmk
|
|
810 |
8928
|
aaronmk
|
--
|
811 |
|
|
-- Table structure for table "subplot"
|
812 |
|
|
--
|
813 |
8632
|
aaronmk
|
|
814 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
815 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
816 |
8928
|
aaronmk
|
CREATE TABLE "subplot" (
|
817 |
|
|
"id" varbinary(767) NOT NULL,
|
818 |
|
|
"x_m" double DEFAULT NULL,
|
819 |
|
|
"y_m" double DEFAULT NULL,
|
820 |
|
|
PRIMARY KEY ("id"),
|
821 |
|
|
CONSTRAINT "fk_subplot_plot1" FOREIGN KEY ("id") REFERENCES "plot" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
822 |
|
|
);
|
823 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
824 |
8581
|
aaronmk
|
|
825 |
8928
|
aaronmk
|
--
|
826 |
|
|
-- Dumping data for table "subplot"
|
827 |
|
|
--
|
828 |
8593
|
aaronmk
|
|
829 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "subplot" DISABLE KEYS */;
|
830 |
|
|
/*!40000 ALTER TABLE "subplot" ENABLE KEYS */;
|
831 |
8632
|
aaronmk
|
|
832 |
8928
|
aaronmk
|
--
|
833 |
|
|
-- Table structure for table "taxon_assertion"
|
834 |
|
|
--
|
835 |
8593
|
aaronmk
|
|
836 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
837 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
838 |
8928
|
aaronmk
|
CREATE TABLE "taxon_assertion" (
|
839 |
|
|
"id" varbinary(767) NOT NULL,
|
840 |
|
|
"string" varbinary(767) NOT NULL,
|
841 |
|
|
"taxon" varbinary(767) DEFAULT NULL,
|
842 |
|
|
"cf_aff" varbinary(767) DEFAULT NULL,
|
843 |
|
|
"annotations" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
844 |
|
|
PRIMARY KEY ("id"),
|
845 |
|
|
KEY "fk_taxon_assertion_taxon_string1_idx" ("string"),
|
846 |
|
|
KEY "fk_taxon_assertion_taxon_name1_idx" ("taxon"),
|
847 |
|
|
CONSTRAINT "fk_qualified_taxon_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
848 |
9617
|
aaronmk
|
CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE,
|
849 |
|
|
CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
850 |
8928
|
aaronmk
|
);
|
851 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
852 |
8594
|
aaronmk
|
|
853 |
8928
|
aaronmk
|
--
|
854 |
|
|
-- Dumping data for table "taxon_assertion"
|
855 |
|
|
--
|
856 |
8594
|
aaronmk
|
|
857 |
8928
|
aaronmk
|
/*!40000 ALTER TABLE "taxon_assertion" DISABLE KEYS */;
|
858 |
|
|
/*!40000 ALTER TABLE "taxon_assertion" ENABLE KEYS */;
|
859 |
|
|
|
860 |
|
|
--
|
861 |
|
|
-- Table structure for table "taxon_concept"
|
862 |
|
|
--
|
863 |
|
|
|
864 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
865 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
866 |
8928
|
aaronmk
|
CREATE TABLE "taxon_concept" (
|
867 |
|
|
"id" varbinary(767) NOT NULL,
|
868 |
|
|
"according_to" varbinary(767) NOT NULL,
|
869 |
|
|
"parent" varbinary(767) NOT NULL,
|
870 |
|
|
"accepted_taxon_concept" varbinary(767) DEFAULT NULL,
|
871 |
|
|
PRIMARY KEY ("id"),
|
872 |
|
|
UNIQUE KEY "taxon_concept_unique_name" ("according_to"),
|
873 |
|
|
KEY "fk_taxon_taxon1_idx" ("parent"),
|
874 |
|
|
KEY "fk_taxon_concept_source1_idx" ("according_to"),
|
875 |
|
|
KEY "fk_taxon_concept_taxon_concept1_idx" ("accepted_taxon_concept"),
|
876 |
9617
|
aaronmk
|
CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
877 |
8928
|
aaronmk
|
CONSTRAINT "fk_taxon_concept_source1" FOREIGN KEY ("according_to") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
878 |
|
|
CONSTRAINT "fk_taxon_concept_taxon_concept1" FOREIGN KEY ("accepted_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
879 |
9617
|
aaronmk
|
CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
880 |
8928
|
aaronmk
|
);
|
881 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
882 |
8928
|
aaronmk
|
|
883 |
|
|
--
|
884 |
|
|
-- Dumping data for table "taxon_concept"
|
885 |
|
|
--
|
886 |
|
|
|
887 |
|
|
/*!40000 ALTER TABLE "taxon_concept" DISABLE KEYS */;
|
888 |
|
|
/*!40000 ALTER TABLE "taxon_concept" ENABLE KEYS */;
|
889 |
|
|
|
890 |
|
|
--
|
891 |
|
|
-- Table structure for table "taxon_determination"
|
892 |
|
|
--
|
893 |
|
|
|
894 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
895 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
896 |
8928
|
aaronmk
|
CREATE TABLE "taxon_determination" (
|
897 |
|
|
"id" varbinary(767) NOT NULL,
|
898 |
|
|
"taxon_assertion" varbinary(767) NOT NULL,
|
899 |
|
|
"identified_by" varbinary(767) DEFAULT NULL,
|
900 |
|
|
"fit_info" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
901 |
|
|
PRIMARY KEY ("id"),
|
902 |
|
|
UNIQUE KEY "taxon_determination_unique" ("taxon_assertion","identified_by"),
|
903 |
|
|
KEY "fk_taxon_occurrence_has_qualified_taxon1_idx" ("taxon_assertion"),
|
904 |
|
|
KEY "fk_taxon_determination_party1_idx" ("identified_by"),
|
905 |
9617
|
aaronmk
|
CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
906 |
8928
|
aaronmk
|
CONSTRAINT "fk_taxon_determination_record1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
907 |
9617
|
aaronmk
|
CONSTRAINT "fk_taxon_determination_party1" FOREIGN KEY ("identified_by") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
908 |
8928
|
aaronmk
|
);
|
909 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
910 |
8928
|
aaronmk
|
|
911 |
|
|
--
|
912 |
|
|
-- Dumping data for table "taxon_determination"
|
913 |
|
|
--
|
914 |
|
|
|
915 |
|
|
/*!40000 ALTER TABLE "taxon_determination" DISABLE KEYS */;
|
916 |
|
|
/*!40000 ALTER TABLE "taxon_determination" ENABLE KEYS */;
|
917 |
|
|
|
918 |
|
|
--
|
919 |
|
|
-- Table structure for table "taxon_name"
|
920 |
|
|
--
|
921 |
|
|
|
922 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
923 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
924 |
8928
|
aaronmk
|
CREATE TABLE "taxon_name" (
|
925 |
|
|
"id" varbinary(767) NOT NULL,
|
926 |
|
|
"unique_name" varbinary(767) NOT NULL,
|
927 |
|
|
"formal_name" varbinary(767) DEFAULT NULL,
|
928 |
|
|
"taxon_name" varbinary(767) DEFAULT NULL,
|
929 |
|
|
"author" varbinary(767) DEFAULT NULL,
|
930 |
|
|
"common_name" varbinary(767) DEFAULT NULL,
|
931 |
|
|
"rank" varbinary(767) DEFAULT NULL,
|
932 |
|
|
PRIMARY KEY ("id"),
|
933 |
|
|
KEY "fk_taxon_concept_taxon_string10_idx" ("unique_name"),
|
934 |
9617
|
aaronmk
|
CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
935 |
|
|
CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE
|
936 |
8928
|
aaronmk
|
);
|
937 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
938 |
8928
|
aaronmk
|
|
939 |
|
|
--
|
940 |
|
|
-- Dumping data for table "taxon_name"
|
941 |
|
|
--
|
942 |
|
|
|
943 |
|
|
/*!40000 ALTER TABLE "taxon_name" DISABLE KEYS */;
|
944 |
|
|
/*!40000 ALTER TABLE "taxon_name" ENABLE KEYS */;
|
945 |
|
|
|
946 |
|
|
--
|
947 |
|
|
-- Table structure for table "taxon_observation"
|
948 |
|
|
--
|
949 |
|
|
|
950 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
951 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
952 |
8928
|
aaronmk
|
CREATE TABLE "taxon_observation" (
|
953 |
|
|
"id" varbinary(767) NOT NULL,
|
954 |
|
|
"taxon_occurrence" varbinary(767) NOT NULL,
|
955 |
|
|
"collector" varbinary(767) DEFAULT NULL,
|
956 |
|
|
"collector_number" varbinary(767) DEFAULT NULL,
|
957 |
|
|
"voucher" varbinary(767) DEFAULT NULL,
|
958 |
|
|
"growth_form" varbinary(767) DEFAULT NULL,
|
959 |
|
|
"cultivated" tinyint(1) DEFAULT NULL,
|
960 |
|
|
"traits" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
961 |
|
|
PRIMARY KEY ("id"),
|
962 |
|
|
KEY "fk_taxon_observation_taxon_occurrence2_idx" ("taxon_occurrence"),
|
963 |
|
|
KEY "fk_taxon_observation_specimen1_idx" ("voucher"),
|
964 |
|
|
KEY "fk_taxon_observation_party1_idx" ("collector"),
|
965 |
|
|
CONSTRAINT "fk_taxon_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
966 |
9617
|
aaronmk
|
CONSTRAINT "fk_taxon_observation_taxon_occurrence2" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
967 |
8928
|
aaronmk
|
CONSTRAINT "fk_taxon_observation_specimen1" FOREIGN KEY ("voucher") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
968 |
9617
|
aaronmk
|
CONSTRAINT "fk_taxon_observation_party1" FOREIGN KEY ("collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
969 |
8928
|
aaronmk
|
);
|
970 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
971 |
8928
|
aaronmk
|
|
972 |
|
|
--
|
973 |
|
|
-- Dumping data for table "taxon_observation"
|
974 |
|
|
--
|
975 |
|
|
|
976 |
|
|
/*!40000 ALTER TABLE "taxon_observation" DISABLE KEYS */;
|
977 |
|
|
/*!40000 ALTER TABLE "taxon_observation" ENABLE KEYS */;
|
978 |
|
|
|
979 |
|
|
--
|
980 |
|
|
-- Table structure for table "taxon_occurrence"
|
981 |
|
|
--
|
982 |
|
|
|
983 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
984 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
985 |
8928
|
aaronmk
|
CREATE TABLE "taxon_occurrence" (
|
986 |
|
|
"id" varbinary(767) NOT NULL,
|
987 |
|
|
"current_determination" varbinary(767) DEFAULT NULL,
|
988 |
|
|
"original_determination" varbinary(767) DEFAULT NULL,
|
989 |
|
|
PRIMARY KEY ("id"),
|
990 |
|
|
KEY "fk_taxon_occurrence_taxon_determination1_idx" ("original_determination"),
|
991 |
|
|
KEY "fk_taxon_occurrence_taxon_determination2_idx" ("current_determination"),
|
992 |
|
|
CONSTRAINT "fk_taxon_occurrence_taxon_determination1" FOREIGN KEY ("original_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
993 |
9617
|
aaronmk
|
CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
994 |
|
|
CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
995 |
8928
|
aaronmk
|
);
|
996 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
997 |
8928
|
aaronmk
|
|
998 |
|
|
--
|
999 |
|
|
-- Dumping data for table "taxon_occurrence"
|
1000 |
|
|
--
|
1001 |
|
|
|
1002 |
|
|
/*!40000 ALTER TABLE "taxon_occurrence" DISABLE KEYS */;
|
1003 |
|
|
/*!40000 ALTER TABLE "taxon_occurrence" ENABLE KEYS */;
|
1004 |
|
|
|
1005 |
|
|
--
|
1006 |
|
|
-- Table structure for table "taxon_path"
|
1007 |
|
|
--
|
1008 |
|
|
|
1009 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1010 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
1011 |
8928
|
aaronmk
|
CREATE TABLE "taxon_path" (
|
1012 |
|
|
"id" varbinary(767) NOT NULL,
|
1013 |
|
|
"family" varbinary(767) DEFAULT NULL,
|
1014 |
|
|
"genus" varbinary(767) DEFAULT NULL,
|
1015 |
|
|
"specific_epithet" varbinary(767) DEFAULT NULL,
|
1016 |
|
|
"ranks" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1017 |
|
|
PRIMARY KEY ("id"),
|
1018 |
|
|
CONSTRAINT "fk_taxon_path_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
1019 |
|
|
);
|
1020 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1021 |
8928
|
aaronmk
|
|
1022 |
|
|
--
|
1023 |
|
|
-- Dumping data for table "taxon_path"
|
1024 |
|
|
--
|
1025 |
|
|
|
1026 |
|
|
/*!40000 ALTER TABLE "taxon_path" DISABLE KEYS */;
|
1027 |
|
|
/*!40000 ALTER TABLE "taxon_path" ENABLE KEYS */;
|
1028 |
|
|
|
1029 |
|
|
--
|
1030 |
|
|
-- Table structure for table "taxon_presence"
|
1031 |
|
|
--
|
1032 |
|
|
|
1033 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1034 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
1035 |
8928
|
aaronmk
|
CREATE TABLE "taxon_presence" (
|
1036 |
|
|
"id" varbinary(767) NOT NULL,
|
1037 |
|
|
"taxon_concept" varbinary(767) NOT NULL,
|
1038 |
|
|
"traits" set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1039 |
|
|
PRIMARY KEY ("id"),
|
1040 |
|
|
KEY "fk_taxon_presence_taxon_name1_idx" ("taxon_concept"),
|
1041 |
|
|
CONSTRAINT "fk_taxon_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
1042 |
|
|
CONSTRAINT "fk_taxon_presence_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
1043 |
|
|
);
|
1044 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1045 |
8928
|
aaronmk
|
|
1046 |
|
|
--
|
1047 |
|
|
-- Dumping data for table "taxon_presence"
|
1048 |
|
|
--
|
1049 |
|
|
|
1050 |
|
|
/*!40000 ALTER TABLE "taxon_presence" DISABLE KEYS */;
|
1051 |
|
|
/*!40000 ALTER TABLE "taxon_presence" ENABLE KEYS */;
|
1052 |
|
|
|
1053 |
|
|
--
|
1054 |
|
|
-- Table structure for table "taxon_string"
|
1055 |
|
|
--
|
1056 |
|
|
|
1057 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1058 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
1059 |
8928
|
aaronmk
|
CREATE TABLE "taxon_string" (
|
1060 |
|
|
"string" varbinary(767) NOT NULL,
|
1061 |
|
|
"parsed_taxon_assertion" varbinary(767) DEFAULT NULL,
|
1062 |
|
|
PRIMARY KEY ("string"),
|
1063 |
|
|
KEY "fk_taxon_string_parsed_taxon_assertion1_idx" ("parsed_taxon_assertion"),
|
1064 |
|
|
CONSTRAINT "fk_taxon_string_parsed_taxon_assertion1" FOREIGN KEY ("parsed_taxon_assertion") REFERENCES "parsed_taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
1065 |
|
|
);
|
1066 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1067 |
8928
|
aaronmk
|
|
1068 |
|
|
--
|
1069 |
|
|
-- Dumping data for table "taxon_string"
|
1070 |
|
|
--
|
1071 |
|
|
|
1072 |
|
|
/*!40000 ALTER TABLE "taxon_string" DISABLE KEYS */;
|
1073 |
|
|
/*!40000 ALTER TABLE "taxon_string" ENABLE KEYS */;
|
1074 |
|
|
|
1075 |
|
|
--
|
1076 |
|
|
-- Table structure for table "validatable_place"
|
1077 |
|
|
--
|
1078 |
|
|
|
1079 |
9630
|
aaronmk
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1080 |
|
|
/*!40101 SET character_set_client = utf8 */;
|
1081 |
8928
|
aaronmk
|
CREATE TABLE "validatable_place" (
|
1082 |
|
|
"id" varbinary(767) NOT NULL,
|
1083 |
|
|
"coordinates" varbinary(767) NOT NULL,
|
1084 |
|
|
"path" varbinary(767) NOT NULL,
|
1085 |
|
|
PRIMARY KEY ("id"),
|
1086 |
|
|
UNIQUE KEY "validatable_place_unique" ("path","coordinates"),
|
1087 |
|
|
KEY "fk_geovalidation_place_path1_idx" ("path"),
|
1088 |
|
|
KEY "fk_geovalidation_coordinates1_idx" ("coordinates"),
|
1089 |
9617
|
aaronmk
|
CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
1090 |
|
|
CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
1091 |
8928
|
aaronmk
|
);
|
1092 |
9630
|
aaronmk
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1093 |
8928
|
aaronmk
|
|
1094 |
|
|
--
|
1095 |
|
|
-- Dumping data for table "validatable_place"
|
1096 |
|
|
--
|
1097 |
|
|
|
1098 |
|
|
/*!40000 ALTER TABLE "validatable_place" DISABLE KEYS */;
|
1099 |
|
|
/*!40000 ALTER TABLE "validatable_place" ENABLE KEYS */;
|
1100 |
|
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
1101 |
|
|
|
1102 |
|
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
1103 |
|
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
1104 |
|
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
1105 |
|
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
1106 |
|
|
|
1107 |
|
|
-- Dump completed
|