Project

General

Profile

1
SET standard_conforming_strings = off;
2
SET escape_string_warning = off;
3
-- MySQL dump 10.11
4
--
5
-- Host: vegbiendev.nceas.ucsb.edu    Database: VegCore
6
-- ------------------------------------------------------
7
-- Server version	5.5.31-0ubuntu0.12.04.1
8
/*!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
CREATE TABLE "aggregate_observation" (
20
  "id" bytea NOT NULL,
21
  "taxon_concept" bytea NOT NULL,
22
  "traits" hstore DEFAULT NULL,
23
  PRIMARY KEY ("id"),
24
  /*KEY "fk_aggregate_observation_taxon_name1_idx" ("taxon_concept")*/CHECK (true),
25
  /*CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
26
  /*CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
27
);
28

    
29
--
30
-- Dumping data for table "aggregate_observation"
31
--
32

    
33
/*!40000 ALTER TABLE "aggregate_observation" DISABLE KEYS */;
34
/*!40000 ALTER TABLE "aggregate_observation" ENABLE KEYS */;
35

    
36
--
37
-- Table structure for table "base_class"
38
--
39

    
40
CREATE TABLE "base_class" (
41
  "id" bytea NOT NULL,
42
  "referenced_class" bytea NOT NULL,
43
  PRIMARY KEY ("id"),
44
  /*KEY "fk_base_class_referenced_class1_idx" ("referenced_class")*/CHECK (true),
45
  /*CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
46
  /*CONSTRAINT "fk_example_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
47
);
48

    
49
--
50
-- Dumping data for table "base_class"
51
--
52

    
53
/*!40000 ALTER TABLE "base_class" DISABLE KEYS */;
54
/*!40000 ALTER TABLE "base_class" ENABLE KEYS */;
55

    
56
--
57
-- Table structure for table "collection"
58
--
59

    
60
CREATE TABLE "collection" (
61
  "id" bytea NOT NULL,
62
  "institution" bytea NOT NULL,
63
  "name" bytea NOT NULL,
64
  PRIMARY KEY ("id"),
65
  /*CONSTRAINT "collection_unique" */UNIQUE ("institution","name"),
66
  /*KEY "fk_collection_organization1_idx" ("institution")*/CHECK (true),
67
  /*KEY "fk_collection_source1_idx" ("id")*/CHECK (true),
68
  /*CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
69
  /*CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
70
);
71

    
72
--
73
-- Dumping data for table "collection"
74
--
75

    
76
/*!40000 ALTER TABLE "collection" DISABLE KEYS */;
77
/*!40000 ALTER TABLE "collection" ENABLE KEYS */;
78

    
79
--
80
-- Table structure for table "community"
81
--
82

    
83
CREATE TABLE "community" (
84
  "id" bytea NOT NULL,
85
  "name" bytea NOT NULL,
86
  "info" hstore DEFAULT NULL,
87
  PRIMARY KEY ("id"),
88
  /*CONSTRAINT "fk_community_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
89
);
90

    
91
--
92
-- Dumping data for table "community"
93
--
94

    
95
/*!40000 ALTER TABLE "community" DISABLE KEYS */;
96
/*!40000 ALTER TABLE "community" ENABLE KEYS */;
97

    
98
--
99
-- Table structure for table "coordinates"
100
--
101

    
102
CREATE TABLE "coordinates" (
103
  "id" bytea NOT NULL,
104
  "latitude_deg" bytea DEFAULT NULL,
105
  "longitude_deg" bytea DEFAULT NULL,
106
  PRIMARY KEY ("id")
107
);
108

    
109
--
110
-- Dumping data for table "coordinates"
111
--
112

    
113
/*!40000 ALTER TABLE "coordinates" DISABLE KEYS */;
114
/*!40000 ALTER TABLE "coordinates" ENABLE KEYS */;
115

    
116
--
117
-- Table structure for table "derived_class"
118
--
119

    
120
CREATE TABLE "derived_class" (
121
  "id" bytea NOT NULL,
122
  PRIMARY KEY ("id"),
123
  /*CONSTRAINT "fk_derived_class_base_class1" FOREIGN KEY ("id") REFERENCES "base_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
124
);
125

    
126
--
127
-- Dumping data for table "derived_class"
128
--
129

    
130
/*!40000 ALTER TABLE "derived_class" DISABLE KEYS */;
131
/*!40000 ALTER TABLE "derived_class" ENABLE KEYS */;
132

    
133
--
134
-- Table structure for table "event"
135
--
136

    
137
CREATE TABLE "event" (
138
  "id" bytea NOT NULL,
139
  "parent" bytea NOT NULL,
140
  "name" bytea DEFAULT NULL,
141
  "date_range" bytea DEFAULT NULL,
142
  "place" bytea DEFAULT NULL,
143
  "method" bytea DEFAULT NULL,
144
  PRIMARY KEY ("id"),
145
  /*KEY "fk_event_place1_idx" ("place")*/CHECK (true),
146
  /*KEY "fk_event1_idx" ("parent")*/CHECK (true),
147
  /*KEY "fk_event_method1_idx" ("method")*/CHECK (true),
148
  /*CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
149
  /*CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
150
  /*CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
151
  /*CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
152
);
153

    
154
--
155
-- Dumping data for table "event"
156
--
157

    
158
/*!40000 ALTER TABLE "event" DISABLE KEYS */;
159
/*!40000 ALTER TABLE "event" ENABLE KEYS */;
160

    
161
--
162
-- Table structure for table "event_participant"
163
--
164

    
165
CREATE TABLE "event_participant" (
166
  "event" bytea NOT NULL,
167
  "party" bytea NOT NULL,
168
  "sort_order" integer DEFAULT NULL,
169
  PRIMARY KEY ("event","party"),
170
  /*KEY "fk_event_has_party_party1_idx" ("party")*/CHECK (true),
171
  /*KEY "fk_event_has_party_event1_idx" ("event")*/CHECK (true),
172
  /*CONSTRAINT "fk_event_has_party_event1" FOREIGN KEY ("event") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
173
  /*CONSTRAINT "fk_event_has_party_party1" FOREIGN KEY ("party") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
174
);
175

    
176
--
177
-- Dumping data for table "event_participant"
178
--
179

    
180
/*!40000 ALTER TABLE "event_participant" DISABLE KEYS */;
181
/*!40000 ALTER TABLE "event_participant" ENABLE KEYS */;
182

    
183
--
184
-- Table structure for table "geological_context"
185
--
186

    
187
CREATE TABLE "geological_context" (
188
  "id" bytea NOT NULL,
189
  "name" bytea NOT NULL,
190
  "info" hstore DEFAULT NULL,
191
  PRIMARY KEY ("id"),
192
  /*CONSTRAINT "fk_geological_context_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
193
);
194

    
195
--
196
-- Dumping data for table "geological_context"
197
--
198

    
199
/*!40000 ALTER TABLE "geological_context" DISABLE KEYS */;
200
/*!40000 ALTER TABLE "geological_context" ENABLE KEYS */;
201

    
202
--
203
-- Table structure for table "geovalidation"
204
--
205

    
206
CREATE TABLE "geovalidation" (
207
  "id" bytea NOT NULL,
208
  "geovalid" integer NOT NULL,
209
  "lat_long_domain_valid" integer NOT NULL,
210
  "lat_long_in_ranks" hstore DEFAULT NULL,
211
  PRIMARY KEY ("id"),
212
  /*CONSTRAINT "fk_geovalidation_validatable_place1" FOREIGN KEY ("id") REFERENCES "validatable_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
213
);
214

    
215
--
216
-- Dumping data for table "geovalidation"
217
--
218

    
219
/*!40000 ALTER TABLE "geovalidation" DISABLE KEYS */;
220
/*!40000 ALTER TABLE "geovalidation" ENABLE KEYS */;
221

    
222
--
223
-- Table structure for table "individual"
224
--
225

    
226
CREATE TABLE "individual" (
227
  "id" bytea NOT NULL,
228
  "tag" bytea DEFAULT NULL,
229
  PRIMARY KEY ("id"),
230
  /*CONSTRAINT "fk_individual_record1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
231
);
232

    
233
--
234
-- Dumping data for table "individual"
235
--
236

    
237
/*!40000 ALTER TABLE "individual" DISABLE KEYS */;
238
/*!40000 ALTER TABLE "individual" ENABLE KEYS */;
239

    
240
--
241
-- Table structure for table "individual_observation"
242
--
243

    
244
CREATE TABLE "individual_observation" (
245
  "id" bytea NOT NULL,
246
  "individual" bytea DEFAULT NULL,
247
  "code" bytea DEFAULT NULL,
248
  "traits" hstore DEFAULT NULL,
249
  PRIMARY KEY ("id"),
250
  /*KEY "fk_individual_observation_individual1_idx" ("individual")*/CHECK (true),
251
  /*CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
252
  /*CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
253
);
254

    
255
--
256
-- Dumping data for table "individual_observation"
257
--
258

    
259
/*!40000 ALTER TABLE "individual_observation" DISABLE KEYS */;
260
/*!40000 ALTER TABLE "individual_observation" ENABLE KEYS */;
261

    
262
--
263
-- Table structure for table "method"
264
--
265

    
266
CREATE TABLE "method" (
267
  "id" bytea NOT NULL,
268
  "parent" bytea NOT NULL,
269
  "info" hstore DEFAULT NULL,
270
  PRIMARY KEY ("id"),
271
  /*KEY "fk_method_method1_idx" ("parent")*/CHECK (true),
272
  /*CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
273
  /*CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
274
);
275

    
276
--
277
-- Dumping data for table "method"
278
--
279

    
280
/*!40000 ALTER TABLE "method" DISABLE KEYS */;
281
/*!40000 ALTER TABLE "method" ENABLE KEYS */;
282

    
283
--
284
-- Table structure for table "organization"
285
--
286

    
287
CREATE TABLE "organization" (
288
  "id" bytea NOT NULL,
289
  "info" hstore DEFAULT NULL,
290
  PRIMARY KEY ("id"),
291
  /*CONSTRAINT "fk_organization_party1" FOREIGN KEY ("id") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
292
);
293

    
294
--
295
-- Dumping data for table "organization"
296
--
297

    
298
/*!40000 ALTER TABLE "organization" DISABLE KEYS */;
299
/*!40000 ALTER TABLE "organization" ENABLE KEYS */;
300

    
301
--
302
-- Table structure for table "parsed_taxon_assertion"
303
--
304

    
305
CREATE TABLE "parsed_taxon_assertion" (
306
  "id" bytea NOT NULL,
307
  "matched_taxon_concept" bytea DEFAULT NULL,
308
  "match_score" float DEFAULT NULL,
309
  "match_info" hstore DEFAULT NULL,
310
  PRIMARY KEY ("id"),
311
  /*KEY "fk_parsed_taxon_assertion_taxon_name1_idx" ("matched_taxon_concept")*/CHECK (true),
312
  /*CONSTRAINT "fk_matched_taxon_qualified_taxon10" FOREIGN KEY ("id") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
313
  /*CONSTRAINT "fk_parsed_taxon_assertion_taxon_name1" FOREIGN KEY ("matched_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
314
);
315

    
316
--
317
-- Dumping data for table "parsed_taxon_assertion"
318
--
319

    
320
/*!40000 ALTER TABLE "parsed_taxon_assertion" DISABLE KEYS */;
321
/*!40000 ALTER TABLE "parsed_taxon_assertion" ENABLE KEYS */;
322

    
323
--
324
-- Table structure for table "party"
325
--
326

    
327
CREATE TABLE "party" (
328
  "id" bytea NOT NULL,
329
  "info" hstore DEFAULT NULL,
330
  PRIMARY KEY ("id"),
331
  /*CONSTRAINT "fk_collection_source10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
332
);
333

    
334
--
335
-- Dumping data for table "party"
336
--
337

    
338
/*!40000 ALTER TABLE "party" DISABLE KEYS */;
339
/*!40000 ALTER TABLE "party" ENABLE KEYS */;
340

    
341
--
342
-- Table structure for table "place"
343
--
344

    
345
CREATE TABLE "place" (
346
  "id" bytea NOT NULL,
347
  "parent" bytea NOT NULL,
348
  "coordinates" bytea DEFAULT NULL,
349
  "path" bytea DEFAULT NULL,
350
  "locality" bytea DEFAULT NULL,
351
  PRIMARY KEY ("id"),
352
  /*KEY "fk_place_coordinates1_idx" ("coordinates")*/CHECK (true),
353
  /*KEY "fk_place1_idx" ("parent")*/CHECK (true),
354
  /*KEY "fk_place_place_path1_idx" ("path")*/CHECK (true),
355
  /*CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
356
  /*CONSTRAINT "fk_place_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
357
  /*CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
358
  /*CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
359
);
360

    
361
--
362
-- Dumping data for table "place"
363
--
364

    
365
/*!40000 ALTER TABLE "place" DISABLE KEYS */;
366
/*!40000 ALTER TABLE "place" ENABLE KEYS */;
367

    
368
--
369
-- Table structure for table "place_observation"
370
--
371

    
372
CREATE TABLE "place_observation" (
373
  "id" bytea NOT NULL,
374
  "place" bytea NOT NULL,
375
  "elevation_m" double precision DEFAULT NULL,
376
  "slope_incline_deg" double precision DEFAULT NULL,
377
  "slope_direction_deg_N" double precision DEFAULT NULL,
378
  "geological_context" bytea DEFAULT NULL,
379
  "community" bytea DEFAULT NULL,
380
  "observations" hstore DEFAULT NULL,
381
  PRIMARY KEY ("id"),
382
  /*KEY "fk_place_observation_place1_idx" ("place")*/CHECK (true),
383
  /*KEY "fk_place_observation_geological_context1_idx" ("geological_context")*/CHECK (true),
384
  /*KEY "fk_place_observation_community1_idx" ("community")*/CHECK (true),
385
  /*KEY "fk_place_observation_event1_idx" ("id")*/CHECK (true),
386
  /*CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
387
  /*CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
388
  /*CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
389
  /*CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
390
);
391

    
392
--
393
-- Dumping data for table "place_observation"
394
--
395

    
396
/*!40000 ALTER TABLE "place_observation" DISABLE KEYS */;
397
/*!40000 ALTER TABLE "place_observation" ENABLE KEYS */;
398

    
399
--
400
-- Table structure for table "place_path"
401
--
402

    
403
CREATE TABLE "place_path" (
404
  "id" bytea NOT NULL,
405
  "continent" bytea DEFAULT NULL,
406
  "country" bytea DEFAULT NULL,
407
  "state_province" bytea DEFAULT NULL,
408
  "county" bytea DEFAULT NULL,
409
  "municipality" bytea DEFAULT NULL,
410
  "ranks" hstore DEFAULT NULL,
411
  PRIMARY KEY ("id")
412
);
413

    
414
--
415
-- Dumping data for table "place_path"
416
--
417

    
418
/*!40000 ALTER TABLE "place_path" DISABLE KEYS */;
419
/*!40000 ALTER TABLE "place_path" ENABLE KEYS */;
420

    
421
--
422
-- Table structure for table "plot"
423
--
424

    
425
CREATE TABLE "plot" (
426
  "id" bytea NOT NULL,
427
  "name" bytea DEFAULT NULL,
428
  "area_m2" double precision DEFAULT NULL,
429
  "bounding_box" bytea DEFAULT NULL,
430
  PRIMARY KEY ("id"),
431
  /*CONSTRAINT "fk_subplot_place1" FOREIGN KEY ("id") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
432
);
433

    
434
--
435
-- Dumping data for table "plot"
436
--
437

    
438
/*!40000 ALTER TABLE "plot" DISABLE KEYS */;
439
/*!40000 ALTER TABLE "plot" ENABLE KEYS */;
440

    
441
--
442
-- Table structure for table "project"
443
--
444

    
445
CREATE TABLE "project" (
446
  "id" bytea NOT NULL,
447
  "name" bytea NOT NULL,
448
  "info" hstore DEFAULT NULL,
449
  PRIMARY KEY ("id"),
450
  /*CONSTRAINT "fk_project_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
451
);
452

    
453
--
454
-- Dumping data for table "project"
455
--
456

    
457
/*!40000 ALTER TABLE "project" DISABLE KEYS */;
458
/*!40000 ALTER TABLE "project" ENABLE KEYS */;
459

    
460
--
461
-- Table structure for table "record"
462
--
463

    
464
CREATE TABLE "record" (
465
  "id" bytea NOT NULL,
466
  "source" bytea NOT NULL,
467
  "source_id_scope" bytea DEFAULT NULL,
468
  "source_record_id" bytea DEFAULT NULL,
469
  "info" hstore DEFAULT NULL,
470
  PRIMARY KEY ("id"),
471
  /*CONSTRAINT "record_unique" */UNIQUE ("source","source_id_scope","source_record_id"),
472
  /*KEY "fk_record_source1_idx" ("source")*/CHECK (true),
473
  /*CONSTRAINT "fk_record_source1" FOREIGN KEY ("source") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
474
);
475

    
476
--
477
-- Dumping data for table "record"
478
--
479

    
480
/*!40000 ALTER TABLE "record" DISABLE KEYS */;
481
/*!40000 ALTER TABLE "record" ENABLE KEYS */;
482

    
483
--
484
-- Table structure for table "referenced_class"
485
--
486

    
487
CREATE TABLE "referenced_class" (
488
  "id" bytea NOT NULL,
489
  PRIMARY KEY ("id"),
490
  /*CONSTRAINT "fk_example_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
491
);
492

    
493
--
494
-- Dumping data for table "referenced_class"
495
--
496

    
497
/*!40000 ALTER TABLE "referenced_class" DISABLE KEYS */;
498
/*!40000 ALTER TABLE "referenced_class" ENABLE KEYS */;
499

    
500
--
501
-- Table structure for table "relationship"
502
--
503

    
504
CREATE TABLE "relationship" (
505
  "id" bytea NOT NULL,
506
  "record" bytea NOT NULL,
507
  "related_record" bytea NOT NULL,
508
  "info" hstore DEFAULT NULL,
509
  PRIMARY KEY ("id"),
510
  /*KEY "fk_relationship_record1_idx" ("record")*/CHECK (true),
511
  /*KEY "fk_relationship_related_record_idx" ("related_record")*/CHECK (true),
512
  /*CONSTRAINT "fk_relationship_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
513
  /*CONSTRAINT "fk_relationship_record2" FOREIGN KEY ("record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
514
  /*CONSTRAINT "fk_relationship_related_record" FOREIGN KEY ("related_record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
515
);
516

    
517
--
518
-- Dumping data for table "relationship"
519
--
520

    
521
/*!40000 ALTER TABLE "relationship" DISABLE KEYS */;
522
/*!40000 ALTER TABLE "relationship" ENABLE KEYS */;
523

    
524
--
525
-- Table structure for table "soil_observation"
526
--
527

    
528
CREATE TABLE "soil_observation" (
529
  "id" bytea NOT NULL,
530
  "observations" hstore DEFAULT NULL,
531
  PRIMARY KEY ("id"),
532
  /*CONSTRAINT "fk_soil_observation_place_observation1" FOREIGN KEY ("id") REFERENCES "place_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
533
);
534

    
535
--
536
-- Dumping data for table "soil_observation"
537
--
538

    
539
/*!40000 ALTER TABLE "soil_observation" DISABLE KEYS */;
540
/*!40000 ALTER TABLE "soil_observation" ENABLE KEYS */;
541

    
542
--
543
-- Table structure for table "source"
544
--
545

    
546
CREATE TABLE "source" (
547
  "id" bytea NOT NULL,
548
  "parent" bytea NOT NULL,
549
  "name" bytea NOT NULL,
550
  "first_publisher" bytea DEFAULT NULL,
551
  "owner" bytea DEFAULT NULL,
552
  "info" hstore DEFAULT NULL,
553
  PRIMARY KEY ("id"),
554
  /*CONSTRAINT "source_unique" */UNIQUE ("parent","name"),
555
  /*KEY "fk_source1_idx" ("parent")*/CHECK (true),
556
  /*KEY "fk_source_party2_idx" ("first_publisher")*/CHECK (true),
557
  /*KEY "fk_source_party1_idx" ("owner")*/CHECK (true),
558
  /*CONSTRAINT "fk_source1" FOREIGN KEY ("parent") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
559
  /*CONSTRAINT "fk_source_party1" FOREIGN KEY ("owner") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
560
  /*CONSTRAINT "fk_source_party2" FOREIGN KEY ("first_publisher") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
561
);
562

    
563
--
564
-- Dumping data for table "source"
565
--
566

    
567
/*!40000 ALTER TABLE "source" DISABLE KEYS */;
568
/*!40000 ALTER TABLE "source" ENABLE KEYS */;
569

    
570
--
571
-- Table structure for table "specimen"
572
--
573

    
574
CREATE TABLE "specimen" (
575
  "id" bytea NOT NULL,
576
  "individual" bytea DEFAULT NULL,
577
  "code_in_individual" bytea DEFAULT NULL,
578
  "collection_event" bytea DEFAULT NULL,
579
  "orig_collection" bytea DEFAULT NULL,
580
  "barcode" bytea DEFAULT NULL,
581
  "accession_number" bytea DEFAULT NULL,
582
  "current_collection" bytea DEFAULT NULL,
583
  "owner_collection" bytea DEFAULT NULL,
584
  PRIMARY KEY ("id"),
585
  /*CONSTRAINT "specimen_unique_in_individual" */UNIQUE ("individual","code_in_individual"),
586
  /*CONSTRAINT "specimen_unique_by_collection_event" */UNIQUE ("collection_event"),
587
  /*CONSTRAINT "specimen_unique_in_collection_by_barcode" */UNIQUE ("orig_collection","barcode"),
588
  /*CONSTRAINT "specimen_unique_in_collection_by_accession_number" */UNIQUE ("orig_collection","accession_number"),
589
  /*KEY "fk_specimen_collection1_idx" ("orig_collection")*/CHECK (true),
590
  /*KEY "fk_specimen_taxon_observation1_idx" ("collection_event")*/CHECK (true),
591
  /*KEY "fk_specimen_individual1_idx" ("individual")*/CHECK (true),
592
  /*KEY "fk_specimen_collection2_idx" ("current_collection")*/CHECK (true),
593
  /*KEY "fk_specimen_organization3_idx" ("owner_collection")*/CHECK (true),
594
  /*CONSTRAINT "fk_specimen_collection1" FOREIGN KEY ("orig_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
595
  /*CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
596
  /*CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
597
  /*CONSTRAINT "fk_specimen_organization3" FOREIGN KEY ("owner_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
598
  /*CONSTRAINT "fk_specimen_taxon_observation1" FOREIGN KEY ("collection_event") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
599
  /*CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
600
);
601

    
602
--
603
-- Dumping data for table "specimen"
604
--
605

    
606
/*!40000 ALTER TABLE "specimen" DISABLE KEYS */;
607
/*!40000 ALTER TABLE "specimen" ENABLE KEYS */;
608

    
609
--
610
-- Table structure for table "specimen_observation"
611
--
612

    
613
CREATE TABLE "specimen_observation" (
614
  "id" bytea NOT NULL,
615
  "specimen" bytea NOT NULL,
616
  "traits" hstore DEFAULT NULL,
617
  PRIMARY KEY ("id"),
618
  /*KEY "fk_specimen_observation_specimen1_idx" ("specimen")*/CHECK (true),
619
  /*CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
620
  /*CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
621
);
622

    
623
--
624
-- Dumping data for table "specimen_observation"
625
--
626

    
627
/*!40000 ALTER TABLE "specimen_observation" DISABLE KEYS */;
628
/*!40000 ALTER TABLE "specimen_observation" ENABLE KEYS */;
629

    
630
--
631
-- Table structure for table "stem"
632
--
633

    
634
CREATE TABLE "stem" (
635
  "id" bytea NOT NULL,
636
  "individual" bytea NOT NULL,
637
  PRIMARY KEY ("id"),
638
  /*KEY "fk_stem_individual1_idx" ("individual")*/CHECK (true),
639
  /*CONSTRAINT "fk_stem_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
640
  /*CONSTRAINT "fk_stem_individual2" FOREIGN KEY ("id") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
641
);
642

    
643
--
644
-- Dumping data for table "stem"
645
--
646

    
647
/*!40000 ALTER TABLE "stem" DISABLE KEYS */;
648
/*!40000 ALTER TABLE "stem" ENABLE KEYS */;
649

    
650
--
651
-- Table structure for table "stem_observation"
652
--
653

    
654
CREATE TABLE "stem_observation" (
655
  "id" bytea NOT NULL,
656
  "individual_observation" bytea NOT NULL,
657
  "stem" bytea DEFAULT NULL,
658
  "traits" hstore DEFAULT NULL,
659
  PRIMARY KEY ("id"),
660
  /*CONSTRAINT "stem_observation_unique" */UNIQUE ("individual_observation","stem"),
661
  /*KEY "fk_stem_observation_individual_observation1_idx" ("individual_observation")*/CHECK (true),
662
  /*KEY "fk_stem_observation_stem1_idx" ("stem")*/CHECK (true),
663
  /*CONSTRAINT "fk_stem_observation_individual_observation1" FOREIGN KEY ("individual_observation") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
664
  /*CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
665
  /*CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
666
);
667

    
668
--
669
-- Dumping data for table "stem_observation"
670
--
671

    
672
/*!40000 ALTER TABLE "stem_observation" DISABLE KEYS */;
673
/*!40000 ALTER TABLE "stem_observation" ENABLE KEYS */;
674

    
675
--
676
-- Table structure for table "stratum"
677
--
678

    
679
CREATE TABLE "stratum" (
680
  "id" bytea NOT NULL,
681
  "name" bytea NOT NULL,
682
  "info" hstore DEFAULT NULL,
683
  PRIMARY KEY ("id"),
684
  /*CONSTRAINT "fk_place_path_record10" FOREIGN KEY ("id") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
685
);
686

    
687
--
688
-- Dumping data for table "stratum"
689
--
690

    
691
/*!40000 ALTER TABLE "stratum" DISABLE KEYS */;
692
/*!40000 ALTER TABLE "stratum" ENABLE KEYS */;
693

    
694
--
695
-- Table structure for table "subplot"
696
--
697

    
698
CREATE TABLE "subplot" (
699
  "id" bytea NOT NULL,
700
  "x_m" double precision DEFAULT NULL,
701
  "y_m" double precision DEFAULT NULL,
702
  PRIMARY KEY ("id"),
703
  /*CONSTRAINT "fk_subplot_plot1" FOREIGN KEY ("id") REFERENCES "plot" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
704
);
705

    
706
--
707
-- Dumping data for table "subplot"
708
--
709

    
710
/*!40000 ALTER TABLE "subplot" DISABLE KEYS */;
711
/*!40000 ALTER TABLE "subplot" ENABLE KEYS */;
712

    
713
--
714
-- Table structure for table "taxon_assertion"
715
--
716

    
717
CREATE TABLE "taxon_assertion" (
718
  "id" bytea NOT NULL,
719
  "string" bytea NOT NULL,
720
  "taxon" bytea DEFAULT NULL,
721
  "cf_aff" bytea DEFAULT NULL,
722
  "annotations" hstore DEFAULT NULL,
723
  PRIMARY KEY ("id"),
724
  /*KEY "fk_taxon_assertion_taxon_string1_idx" ("string")*/CHECK (true),
725
  /*KEY "fk_taxon_assertion_taxon_name1_idx" ("taxon")*/CHECK (true),
726
  /*CONSTRAINT "fk_qualified_taxon_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
727
  /*CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
728
  /*CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
729
);
730

    
731
--
732
-- Dumping data for table "taxon_assertion"
733
--
734

    
735
/*!40000 ALTER TABLE "taxon_assertion" DISABLE KEYS */;
736
/*!40000 ALTER TABLE "taxon_assertion" ENABLE KEYS */;
737

    
738
--
739
-- Table structure for table "taxon_concept"
740
--
741

    
742
CREATE TABLE "taxon_concept" (
743
  "id" bytea NOT NULL,
744
  "according_to" bytea NOT NULL,
745
  "parent" bytea NOT NULL,
746
  "accepted_taxon_concept" bytea DEFAULT NULL,
747
  PRIMARY KEY ("id"),
748
  /*CONSTRAINT "taxon_concept_unique_name" */UNIQUE ("according_to"),
749
  /*KEY "fk_taxon_taxon1_idx" ("parent")*/CHECK (true),
750
  /*KEY "fk_taxon_concept_source1_idx" ("according_to")*/CHECK (true),
751
  /*KEY "fk_taxon_concept_taxon_concept1_idx" ("accepted_taxon_concept")*/CHECK (true),
752
  /*CONSTRAINT "fk_taxon_concept_source1" FOREIGN KEY ("according_to") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
753
  /*CONSTRAINT "fk_taxon_concept_taxon_concept1" FOREIGN KEY ("accepted_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
754
  /*CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
755
  /*CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
756
);
757

    
758
--
759
-- Dumping data for table "taxon_concept"
760
--
761

    
762
/*!40000 ALTER TABLE "taxon_concept" DISABLE KEYS */;
763
/*!40000 ALTER TABLE "taxon_concept" ENABLE KEYS */;
764

    
765
--
766
-- Table structure for table "taxon_determination"
767
--
768

    
769
CREATE TABLE "taxon_determination" (
770
  "id" bytea NOT NULL,
771
  "taxon_assertion" bytea NOT NULL,
772
  "identified_by" bytea DEFAULT NULL,
773
  "fit_info" hstore DEFAULT NULL,
774
  PRIMARY KEY ("id"),
775
  /*CONSTRAINT "taxon_determination_unique" */UNIQUE ("taxon_assertion","identified_by"),
776
  /*KEY "fk_taxon_occurrence_has_qualified_taxon1_idx" ("taxon_assertion")*/CHECK (true),
777
  /*KEY "fk_taxon_determination_party1_idx" ("identified_by")*/CHECK (true),
778
  /*CONSTRAINT "fk_taxon_determination_party1" FOREIGN KEY ("identified_by") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
779
  /*CONSTRAINT "fk_taxon_determination_record1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
780
  /*CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
781
);
782

    
783
--
784
-- Dumping data for table "taxon_determination"
785
--
786

    
787
/*!40000 ALTER TABLE "taxon_determination" DISABLE KEYS */;
788
/*!40000 ALTER TABLE "taxon_determination" ENABLE KEYS */;
789

    
790
--
791
-- Table structure for table "taxon_name"
792
--
793

    
794
CREATE TABLE "taxon_name" (
795
  "id" bytea NOT NULL,
796
  "unique_name" bytea NOT NULL,
797
  "formal_name" bytea DEFAULT NULL,
798
  "taxon_name" bytea DEFAULT NULL,
799
  "author" bytea DEFAULT NULL,
800
  "common_name" bytea DEFAULT NULL,
801
  "rank" bytea DEFAULT NULL,
802
  PRIMARY KEY ("id"),
803
  /*KEY "fk_taxon_concept_taxon_string10_idx" ("unique_name")*/CHECK (true),
804
  /*CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
805
  /*CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
806
);
807

    
808
--
809
-- Dumping data for table "taxon_name"
810
--
811

    
812
/*!40000 ALTER TABLE "taxon_name" DISABLE KEYS */;
813
/*!40000 ALTER TABLE "taxon_name" ENABLE KEYS */;
814

    
815
--
816
-- Table structure for table "taxon_observation"
817
--
818

    
819
CREATE TABLE "taxon_observation" (
820
  "id" bytea NOT NULL,
821
  "taxon_occurrence" bytea NOT NULL,
822
  "collector" bytea DEFAULT NULL,
823
  "collector_number" bytea DEFAULT NULL,
824
  "voucher" bytea DEFAULT NULL,
825
  "growth_form" bytea DEFAULT NULL,
826
  "cultivated" integer DEFAULT NULL,
827
  "traits" hstore DEFAULT NULL,
828
  PRIMARY KEY ("id"),
829
  /*KEY "fk_taxon_observation_taxon_occurrence2_idx" ("taxon_occurrence")*/CHECK (true),
830
  /*KEY "fk_taxon_observation_specimen1_idx" ("voucher")*/CHECK (true),
831
  /*KEY "fk_taxon_observation_party1_idx" ("collector")*/CHECK (true),
832
  /*CONSTRAINT "fk_taxon_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
833
  /*CONSTRAINT "fk_taxon_observation_party1" FOREIGN KEY ("collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
834
  /*CONSTRAINT "fk_taxon_observation_specimen1" FOREIGN KEY ("voucher") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
835
  /*CONSTRAINT "fk_taxon_observation_taxon_occurrence2" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
836
);
837

    
838
--
839
-- Dumping data for table "taxon_observation"
840
--
841

    
842
/*!40000 ALTER TABLE "taxon_observation" DISABLE KEYS */;
843
/*!40000 ALTER TABLE "taxon_observation" ENABLE KEYS */;
844

    
845
--
846
-- Table structure for table "taxon_occurrence"
847
--
848

    
849
CREATE TABLE "taxon_occurrence" (
850
  "id" bytea NOT NULL,
851
  "current_determination" bytea DEFAULT NULL,
852
  "original_determination" bytea DEFAULT NULL,
853
  PRIMARY KEY ("id"),
854
  /*KEY "fk_taxon_occurrence_taxon_determination1_idx" ("original_determination")*/CHECK (true),
855
  /*KEY "fk_taxon_occurrence_taxon_determination2_idx" ("current_determination")*/CHECK (true),
856
  /*CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
857
  /*CONSTRAINT "fk_taxon_occurrence_taxon_determination1" FOREIGN KEY ("original_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
858
  /*CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
859
);
860

    
861
--
862
-- Dumping data for table "taxon_occurrence"
863
--
864

    
865
/*!40000 ALTER TABLE "taxon_occurrence" DISABLE KEYS */;
866
/*!40000 ALTER TABLE "taxon_occurrence" ENABLE KEYS */;
867

    
868
--
869
-- Table structure for table "taxon_path"
870
--
871

    
872
CREATE TABLE "taxon_path" (
873
  "id" bytea NOT NULL,
874
  "family" bytea DEFAULT NULL,
875
  "genus" bytea DEFAULT NULL,
876
  "specific_epithet" bytea DEFAULT NULL,
877
  "ranks" hstore DEFAULT NULL,
878
  PRIMARY KEY ("id"),
879
  /*CONSTRAINT "fk_taxon_path_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
880
);
881

    
882
--
883
-- Dumping data for table "taxon_path"
884
--
885

    
886
/*!40000 ALTER TABLE "taxon_path" DISABLE KEYS */;
887
/*!40000 ALTER TABLE "taxon_path" ENABLE KEYS */;
888

    
889
--
890
-- Table structure for table "taxon_presence"
891
--
892

    
893
CREATE TABLE "taxon_presence" (
894
  "id" bytea NOT NULL,
895
  "taxon_concept" bytea NOT NULL,
896
  "traits" hstore DEFAULT NULL,
897
  PRIMARY KEY ("id"),
898
  /*KEY "fk_taxon_presence_taxon_name1_idx" ("taxon_concept")*/CHECK (true),
899
  /*CONSTRAINT "fk_taxon_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
900
  /*CONSTRAINT "fk_taxon_presence_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
901
);
902

    
903
--
904
-- Dumping data for table "taxon_presence"
905
--
906

    
907
/*!40000 ALTER TABLE "taxon_presence" DISABLE KEYS */;
908
/*!40000 ALTER TABLE "taxon_presence" ENABLE KEYS */;
909

    
910
--
911
-- Table structure for table "taxon_string"
912
--
913

    
914
CREATE TABLE "taxon_string" (
915
  "string" bytea NOT NULL,
916
  "parsed_taxon_assertion" bytea DEFAULT NULL,
917
  PRIMARY KEY ("string"),
918
  /*KEY "fk_taxon_string_parsed_taxon_assertion1_idx" ("parsed_taxon_assertion")*/CHECK (true),
919
  /*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)
920
);
921

    
922
--
923
-- Dumping data for table "taxon_string"
924
--
925

    
926
/*!40000 ALTER TABLE "taxon_string" DISABLE KEYS */;
927
/*!40000 ALTER TABLE "taxon_string" ENABLE KEYS */;
928

    
929
--
930
-- Table structure for table "validatable_place"
931
--
932

    
933
CREATE TABLE "validatable_place" (
934
  "id" bytea NOT NULL,
935
  "coordinates" bytea NOT NULL,
936
  "path" bytea NOT NULL,
937
  PRIMARY KEY ("id"),
938
  /*CONSTRAINT "validatable_place_unique" */UNIQUE ("path","coordinates"),
939
  /*KEY "fk_geovalidation_place_path1_idx" ("path")*/CHECK (true),
940
  /*KEY "fk_geovalidation_coordinates1_idx" ("coordinates")*/CHECK (true),
941
  /*CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
942
  /*CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
943
);
944

    
945
--
946
-- Dumping data for table "validatable_place"
947
--
948

    
949
/*!40000 ALTER TABLE "validatable_place" DISABLE KEYS */;
950
/*!40000 ALTER TABLE "validatable_place" ENABLE KEYS */;
951
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
952

    
953
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
954
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
955
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
956
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
957

    
958
-- Dump completed
(9-9/14)