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