Project

General

Profile

1 689 aaronmk
--
2
-- PostgreSQL database dump
3
--
4
5
6
7
8
9
10
11
12
13
--
14 6182 aaronmk
-- Name: accesslevel; Type: TYPE; Schema: public; Owner: -
15
--
16
17
18
19
20
--
21 1431 aaronmk
-- Name: establishmentmeans_dwc; Type: TYPE; Schema: public; Owner: -
22
--
23
24
25
26
27
--
28
-- Name: TYPE establishmentmeans_dwc; Type: COMMENT; Schema: public; Owner: -
29
--
30
31
32
33
34
--
35
-- Name: growthform; Type: TYPE; Schema: public; Owner: -
36
--
37
38
39
40
41
--
42 6021 aaronmk
-- Name: higher_plant_group; Type: TYPE; Schema: public; Owner: -
43
--
44
45
46
47
48
--
49 712 aaronmk
-- Name: occurrencestatus_dwc; Type: TYPE; Schema: public; Owner: -
50
--
51
52
53
54 713 aaronmk
55 712 aaronmk
--
56 1313 aaronmk
-- Name: placerank; Type: TYPE; Schema: public; Owner: -
57
--
58
59
60
61
62
--
63
-- Name: TYPE placerank; Type: COMMENT; Schema: public; Owner: -
64
--
65
66
67
68
69
--
70 4954 aaronmk
-- Name: rankedplacename; Type: TYPE; Schema: public; Owner: -
71
--
72
73
74
75
76
--
77 4933 aaronmk
-- Name: taxonrank; Type: TYPE; Schema: public; Owner: -
78 1337 aaronmk
--
79
80
81
82
83
--
84 4933 aaronmk
-- Name: TYPE taxonrank; Type: COMMENT; Schema: public; Owner: -
85 1174 aaronmk
--
86
87
88
89
90
--
91 4933 aaronmk
-- Name: rankedtaxonname; Type: TYPE; Schema: public; Owner: -
92 1431 aaronmk
--
93
94
95
96
97
--
98 6179 aaronmk
-- Name: relationship; Type: TYPE; Schema: public; Owner: -
99 6150 aaronmk
--
100
101
102
103
104
--
105 6179 aaronmk
-- Name: role; Type: TYPE; Schema: public; Owner: -
106 6152 aaronmk
--
107
108
109
110
111
--
112 6283 aaronmk
-- Name: TYPE role; Type: COMMENT; Schema: public; Owner: -
113
--
114
115
116
117
118
--
119 6179 aaronmk
-- Name: sourcetype; Type: TYPE; Schema: public; Owner: -
120 5622 aaronmk
--
121
122
123
124
125
--
126 6179 aaronmk
-- Name: TYPE sourcetype; Type: COMMENT; Schema: public; Owner: -
127 1111 aaronmk
--
128
129
130
131
132
--
133 4933 aaronmk
-- Name: taxonclass; Type: TYPE; Schema: public; Owner: -
134 4532 aaronmk
--
135
136
137
138
139
--
140 4933 aaronmk
-- Name: TYPE taxonclass; Type: COMMENT; Schema: public; Owner: -
141
--
142
143
144
145
146
--
147 5617 aaronmk
-- Name: taxonomic_status; Type: TYPE; Schema: public; Owner: -
148
--
149
150
151
152
153
--
154 5623 aaronmk
-- Name: TYPE taxonomic_status; Type: COMMENT; Schema: public; Owner: -
155
--
156
157
158
159
160
--
161 5839 aaronmk
-- Name: _cm_to_m(double precision); Type: FUNCTION; Schema: public; Owner: -
162
--
163
164
165
166
167
--
168 5475 aaronmk
-- Name: _fraction_to_percent(double precision); Type: FUNCTION; Schema: public; Owner: -
169
--
170
171
172
173
174
--
175 5844 aaronmk
-- Name: _ft_to_m(double precision); Type: FUNCTION; Schema: public; Owner: -
176
--
177
178
179
180
181
--
182
-- Name: _ha_to_m2(double precision); Type: FUNCTION; Schema: public; Owner: -
183
--
184
185
186
187
188
--
189 5729 aaronmk
-- Name: _has_taxonomic_name(taxonrank); Type: FUNCTION; Schema: public; Owner: -
190
--
191
192
193
194
195
--
196 5844 aaronmk
-- Name: _in_to_m(double precision); Type: FUNCTION; Schema: public; Owner: -
197
--
198
199
200
201
202
--
203 5934 aaronmk
-- Name: _km_to_m(double precision); Type: FUNCTION; Schema: public; Owner: -
204
--
205
206
207
208
209
--
210 6430 aaronmk
-- Name: _locationnarrative_is_cultivated(varchar(255)); Type: FUNCTION; Schema: public; Owner: -
211
--
212
213
214
215
216
--
217 5842 aaronmk
-- Name: _m2_to_ha(double precision); Type: FUNCTION; Schema: public; Owner: -
218
--
219
220
221
222
223
--
224 5840 aaronmk
-- Name: _m_to_cm(double precision); Type: FUNCTION; Schema: public; Owner: -
225
--
226
227
228
229
230
--
231 6007 aaronmk
-- Name: _m_to_km(double precision); Type: FUNCTION; Schema: public; Owner: -
232
--
233
234
235
236
237
--
238 6436 aaronmk
-- Name: _or(int(1), int(1), int(1), int(1), int(1)); Type: FUNCTION; Schema: public; Owner: -
239
--
240
241
242
243
244
--
245 6437 aaronmk
-- Name: FUNCTION _or(`0` int(1), `1` int(1), `2` int(1), `3` int(1), `4` int(1)); Type: COMMENT; Schema: public; Owner: -
246
--
247
248
249
250
251
--
252 5844 aaronmk
-- Name: _percent_to_fraction(double precision); Type: FUNCTION; Schema: public; Owner: -
253
--
254
255
256
257
258
--
259 6429 aaronmk
-- Name: _taxon_family_require_std(varchar(255)); Type: FUNCTION; Schema: public; Owner: -
260 5789 aaronmk
--
261
262
263
264
265
--
266 5608 aaronmk
-- Name: _taxonlabel_set_matched_label_id(int(11), int(11), double precision); Type: FUNCTION; Schema: public; Owner: -
267 4391 aaronmk
--
268
269
270
271
272
--
273 5608 aaronmk
-- Name: _taxonlabel_set_parent_id(int(11), int(11)); Type: FUNCTION; Schema: public; Owner: -
274 5510 aaronmk
--
275
276
277
278
279
--
280 5732 aaronmk
-- Name: _taxonomic_name_is_epithet(taxonrank); Type: FUNCTION; Schema: public; Owner: -
281
--
282
283
284
285
286
--
287 6036 aaronmk
-- Name: make_family_higher_plant_group(); Type: FUNCTION; Schema: public; Owner: -
288
--
289
290
291
292
293
--
294 6179 aaronmk
-- Name: party_source_id_self_ref(); Type: FUNCTION; Schema: public; Owner: -
295 5234 aaronmk
--
296
297
298
299
300
--
301 5855 aaronmk
-- Name: place_matched_place_id_self_ref(); Type: FUNCTION; Schema: public; Owner: -
302 5032 aaronmk
--
303
304
305
306
307 5984 aaronmk
308
309
310
311 5032 aaronmk
--
312 5984 aaronmk
-- Name: place; Type: TABLE; Schema: public; Owner: -; Tablespace:
313
--
314
315
CREATE TABLE place (
316
    place_id int(11) NOT NULL,
317 6179 aaronmk
    source_id int(11) NOT NULL,
318 5984 aaronmk
    canon_place_id int(11),
319
    matched_place_id int(11),
320
    coordinates_id int(11),
321
    placename_id int(11),
322 6429 aaronmk
    continent varchar(255),
323
    country varchar(255),
324
    stateprovince varchar(255),
325
    county varchar(255),
326
    description varchar(255),
327 6185 aaronmk
    geovalid int(1),
328 5984 aaronmk
    distance_to_country_m double precision,
329 6268 aaronmk
    distance_to_state_m double precision,
330
    distance_to_county_m double precision
331 5984 aaronmk
);
332
333
334
--
335
-- Name: TABLE place; Type: COMMENT; Schema: public; Owner: -
336
--
337
338
339
340
341
--
342
-- Name: COLUMN place.matched_place_id; Type: COMMENT; Schema: public; Owner: -
343
--
344
345
346
347
348
--
349
-- Name: place_set_canon_place_id(place, int(11), int(1)); Type: FUNCTION; Schema: public; Owner: -
350
--
351
352
353
354
355
--
356
-- Name: place_set_canon_place_id_on_insert(); Type: FUNCTION; Schema: public; Owner: -
357
--
358
359
360
361
362
--
363
-- Name: place_set_canon_place_id_on_update(); Type: FUNCTION; Schema: public; Owner: -
364
--
365
366
367
368
369
--
370 5855 aaronmk
-- Name: placename_update_ancestors(); Type: FUNCTION; Schema: public; Owner: -
371 1555 aaronmk
--
372
373
374
375
376
--
377 5189 aaronmk
-- Name: plantobservation_aggregateoccurrence_count_1(); Type: FUNCTION; Schema: public; Owner: -
378 5188 aaronmk
--
379
380
381
382
383
--
384 6429 aaronmk
-- Name: source_by_shortname(varchar(255)); Type: FUNCTION; Schema: public; Owner: -
385 6086 aaronmk
--
386
387
388
389
390
--
391 5866 aaronmk
-- Name: sync_analytical_aggregate_to_view(); Type: FUNCTION; Schema: public; Owner: -
392 5849 aaronmk
--
393
394
395
396
397
--
398 5865 aaronmk
-- Name: sync_analytical_stem_to_view(); Type: FUNCTION; Schema: public; Owner: -
399 5847 aaronmk
--
400
401
402
403
404
--
405 5991 aaronmk
-- Name: sync_geoscrub_input_to_view(); Type: FUNCTION; Schema: public; Owner: -
406
--
407
408
409
410
411
--
412 6421 aaronmk
-- Name: taxondetermination_set_iscurrent(); Type: FUNCTION; Schema: public; Owner: -
413
--
414
415
416
417
418
--
419 5608 aaronmk
-- Name: taxonlabel_0_matched_label_id_self_ref(); Type: FUNCTION; Schema: public; Owner: -
420 5032 aaronmk
--
421
422
423
424
425
--
426 5608 aaronmk
-- Name: taxonlabel_1_matched_label_min_fit(); Type: FUNCTION; Schema: public; Owner: -
427 5412 aaronmk
--
428
429
430
431
432
--
433 5705 aaronmk
-- Name: taxonlabel_2_set_canon_label_id_on_insert(); Type: FUNCTION; Schema: public; Owner: -
434 5473 aaronmk
--
435
436
437
438
439
--
440 5705 aaronmk
-- Name: taxonlabel_2_set_canon_label_id_on_update(); Type: FUNCTION; Schema: public; Owner: -
441
--
442
443
444
445
446
--
447 5608 aaronmk
-- Name: taxonlabel_3_parent_id_avoid_self_ref(); Type: FUNCTION; Schema: public; Owner: -
448 5547 aaronmk
--
449
450
451
452
453
--
454 5608 aaronmk
-- Name: taxonlabel; Type: TABLE; Schema: public; Owner: -; Tablespace:
455 5274 aaronmk
--
456
457 5608 aaronmk
CREATE TABLE taxonlabel (
458
    taxonlabel_id int(11) NOT NULL,
459 6179 aaronmk
    source_id int(11) NOT NULL,
460 6429 aaronmk
    sourceaccessioncode varchar(255),
461 5548 aaronmk
    creationdate date,
462 6429 aaronmk
    taxonstatus varchar(255),
463 5626 aaronmk
    canon_label_id int(11),
464 5608 aaronmk
    matched_label_id int(11),
465
    matched_label_fit_fraction double precision,
466 5548 aaronmk
    parent_id int(11),
467 6429 aaronmk
    taxonepithet varchar(255),
468
    rank varchar(255),
469
    taxonomicname varchar(255),
470
    accessioncode varchar(255)
471 5548 aaronmk
);
472 5274 aaronmk
473
474 5548 aaronmk
--
475 5608 aaronmk
-- Name: TABLE taxonlabel; Type: COMMENT; Schema: public; Owner: -
476 5548 aaronmk
--
477 5274 aaronmk
478 5548 aaronmk
479
480
481 5274 aaronmk
--
482 6179 aaronmk
-- Name: COLUMN taxonlabel.source_id; Type: COMMENT; Schema: public; Owner: -
483 689 aaronmk
--
484
485
486
487
488 5548 aaronmk
--
489 5608 aaronmk
-- Name: COLUMN taxonlabel.sourceaccessioncode; Type: COMMENT; Schema: public; Owner: -
490 5548 aaronmk
--
491 689 aaronmk
492
493
494
495
--
496 5608 aaronmk
-- Name: COLUMN taxonlabel.creationdate; Type: COMMENT; Schema: public; Owner: -
497 5548 aaronmk
--
498
499
500
501
502
--
503 5626 aaronmk
-- Name: COLUMN taxonlabel.canon_label_id; Type: COMMENT; Schema: public; Owner: -
504 5548 aaronmk
--
505
506
507
508
509
--
510 5608 aaronmk
-- Name: COLUMN taxonlabel.matched_label_id; Type: COMMENT; Schema: public; Owner: -
511 5548 aaronmk
--
512
513
514
515
516
--
517 5608 aaronmk
-- Name: COLUMN taxonlabel.matched_label_fit_fraction; Type: COMMENT; Schema: public; Owner: -
518 5548 aaronmk
--
519
520
521
522
523
--
524 5608 aaronmk
-- Name: COLUMN taxonlabel.parent_id; Type: COMMENT; Schema: public; Owner: -
525 5548 aaronmk
--
526
527
528
529
530
--
531 5608 aaronmk
-- Name: COLUMN taxonlabel.taxonepithet; Type: COMMENT; Schema: public; Owner: -
532 5548 aaronmk
--
533
534
535
536
537
--
538 5608 aaronmk
-- Name: COLUMN taxonlabel.rank; Type: COMMENT; Schema: public; Owner: -
539 5548 aaronmk
--
540
541
542
543
544
--
545 5656 aaronmk
-- Name: COLUMN taxonlabel.taxonomicname; Type: COMMENT; Schema: public; Owner: -
546 5548 aaronmk
--
547
548
549
550
551
--
552 5831 aaronmk
-- Name: taxonlabel_set_canon_label_id(taxonlabel, int(11), int(1)); Type: FUNCTION; Schema: public; Owner: -
553
--
554
555
556
557
558
--
559 5828 aaronmk
-- Name: taxonlabel_update_ancestors(taxonlabel, int(11), int(11)); Type: FUNCTION; Schema: public; Owner: -
560 5548 aaronmk
--
561
562
563
564
565
--
566 5608 aaronmk
-- Name: taxonlabel_update_ancestors_on_insert(); Type: FUNCTION; Schema: public; Owner: -
567 5548 aaronmk
--
568
569
570
571
572
--
573 5608 aaronmk
-- Name: taxonlabel_update_ancestors_on_update(); Type: FUNCTION; Schema: public; Owner: -
574 5548 aaronmk
--
575
576
577
578
579
--
580 6429 aaronmk
-- Name: concat(varchar(255)); Type: AGGREGATE; Schema: public; Owner: -
581 5548 aaronmk
--
582
583
584
585
586
--
587 689 aaronmk
-- Name: address; Type: TABLE; Schema: public; Owner: -; Tablespace:
588
--
589
590
CREATE TABLE address (
591
    address_id int(11) NOT NULL,
592
    party_id int(11) NOT NULL,
593
    organization_id int(11),
594 6429 aaronmk
    orgposition varchar(255),
595
    email varchar(255),
596
    street varchar(255),
597
    street2 varchar(255),
598
    city varchar(255),
599
    stateprovince varchar(255),
600
    postalcode varchar(255),
601
    country varchar(255),
602 689 aaronmk
    currentflag int(1),
603 5499 aaronmk
    addressstartdate date
604 689 aaronmk
);
605
606
607
--
608
-- Name: address_address_id_seq; Type: SEQUENCE; Schema: public; Owner: -
609
--
610
611
612
613
614
--
615
-- Name: address_address_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
616
--
617
618
619
620
621
--
622 6029 aaronmk
-- Name: address_address_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
623
--
624
625
626
627
--
628 5866 aaronmk
-- Name: aggregateoccurrence; Type: TABLE; Schema: public; Owner: -; Tablespace:
629 5849 aaronmk
--
630
631 5866 aaronmk
CREATE TABLE aggregateoccurrence (
632
    aggregateoccurrence_id int(11) NOT NULL,
633 6179 aaronmk
    source_id int(11) NOT NULL,
634 6429 aaronmk
    sourceaccessioncode varchar(255),
635 5866 aaronmk
    taxonoccurrence_id int(11),
636
    collectiondate date,
637
    cover_fraction double precision,
638
    linecover_m double precision,
639
    basalarea_m2 double precision,
640
    biomass_kg_m2 double precision,
641
    inferencearea_m2 double precision,
642
    count int(11),
643
    stratum_id int(11),
644
    coverindex_id int(11),
645 6429 aaronmk
    occurrencestatus_dwc varchar(255) DEFAULT 'present' NOT NULL,
646 5866 aaronmk
    method_id int(11),
647 6429 aaronmk
    notes varchar(255),
648
    accessioncode varchar(255)
649 5866 aaronmk
);
650
651
652
--
653
-- Name: TABLE aggregateoccurrence; Type: COMMENT; Schema: public; Owner: -
654
--
655
656
657
658
659
--
660
-- Name: COLUMN aggregateoccurrence.linecover_m; Type: COMMENT; Schema: public; Owner: -
661
--
662
663
664
665
666
--
667
-- Name: COLUMN aggregateoccurrence.occurrencestatus_dwc; Type: COMMENT; Schema: public; Owner: -
668
--
669
670
671
672
673
--
674
-- Name: aggregateoccurrence_aggregateoccurrence_id_seq; Type: SEQUENCE; Schema: public; Owner: -
675
--
676
677
678
679
680
--
681
-- Name: aggregateoccurrence_aggregateoccurrence_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
682
--
683
684
685
686
687
--
688 6029 aaronmk
-- Name: aggregateoccurrence_aggregateoccurrence_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
689
--
690
691
692
693
--
694 6482 aaronmk
-- Name: analytical_aggregate; Type: TABLE; Schema: public; Owner: -; Tablespace:
695
--
696
697
CREATE TABLE analytical_aggregate (
698
    `institutionCode` varchar(255) NOT NULL,
699
    country varchar(255),
700
    `stateProvince` varchar(255),
701
    county varchar(255),
702
    `decimalLatitude` double precision,
703
    `decimalLongitude` double precision,
704
    `coordinateUncertaintyInMeters` double precision,
705
    geovalid int(1),
706
    `isNewWorld` int(1),
707
    `distanceToCountry_km` double precision,
708
    `distanceToStateProvince_km` double precision,
709
    `plotName` varchar(255) NOT NULL,
710
    `elevationInMeters` double precision,
711
    `plotArea_ha` double precision,
712
    `samplingProtocol` varchar(255),
713
    `dateCollected` date NOT NULL,
714
    `higherPlantGroup` varchar(255),
715
    family varchar(255),
716
    genus varchar(255),
717
    `speciesBinomial` varchar(255),
718
    `scientificName` varchar(255),
719
    `scientificNameAuthorship` varchar(255),
720
    `scientificNameWithMorphospecies` varchar(255),
721
    threatened int(1),
722
    `identifiedBy` varchar(255),
723
    `growthForm` varchar(255),
724
    cultivated int(1),
725
    `cultivatedBasis` varchar(255),
726
    `coverPercent` double precision,
727
    `individualCount` varchar(255),
728
    `individualCount_1cm_or_more` varchar(255),
729
    `individualCount_2_5cm_or_more` varchar(255),
730
    `individualCount_10cm_or_more` varchar(255)
731
);
732
733
734
--
735
-- Name: analytical_stem; Type: TABLE; Schema: public; Owner: -; Tablespace:
736
--
737
738
CREATE TABLE analytical_stem (
739
    `institutionCode` varchar(255) NOT NULL,
740
    country varchar(255),
741
    `stateProvince` varchar(255),
742
    county varchar(255),
743
    `decimalLatitude` double precision,
744
    `decimalLongitude` double precision,
745
    `coordinateUncertaintyInMeters` double precision,
746
    geovalid int(1),
747
    `isNewWorld` int(1),
748
    `distanceToCountry_km` double precision,
749
    `distanceToStateProvince_km` double precision,
750
    `plotName` varchar(255) NOT NULL,
751
    `elevationInMeters` double precision,
752
    `plotArea_ha` double precision,
753
    `samplingProtocol` varchar(255),
754
    `dateCollected` date NOT NULL,
755
    `higherPlantGroup` varchar(255),
756
    family varchar(255),
757
    genus varchar(255),
758
    `speciesBinomial` varchar(255),
759
    `scientificName` varchar(255),
760
    `scientificNameAuthorship` varchar(255),
761
    `scientificNameWithMorphospecies` varchar(255),
762
    threatened int(1),
763
    `identifiedBy` varchar(255),
764
    `growthForm` varchar(255),
765
    cultivated int(1),
766
    `cultivatedBasis` varchar(255),
767
    `coverPercent` double precision,
768
    `diameterBreastHeight_cm` double precision,
769
    height_m double precision,
770
    tag varchar(255),
771
    `organismX_m` double precision,
772
    `organismY_m` double precision,
773
    `recordedBy` varchar(255),
774
    `recordNumber` varchar(255)
775
);
776
777
778
--
779 5866 aaronmk
-- Name: analytical_aggregate_view; Type: VIEW; Schema: public; Owner: -
780 5849 aaronmk
--
781
782
783
784
785
--
786 5862 aaronmk
-- Name: coordinates; Type: TABLE; Schema: public; Owner: -; Tablespace:
787
--
788
789
CREATE TABLE coordinates (
790
    coordinates_id int(11) NOT NULL,
791 6179 aaronmk
    source_id int(11) NOT NULL,
792 5862 aaronmk
    latitude_deg double precision NOT NULL,
793
    longitude_deg double precision NOT NULL,
794 6429 aaronmk
    verbatimlatitude varchar(255),
795
    verbatimlongitude varchar(255),
796
    verbatimcoordinates varchar(255),
797
    footprintgeometry_dwc varchar(255),
798 6250 aaronmk
    coordsaccuracy_m double precision
799 5862 aaronmk
);
800
801
802
--
803
-- Name: COLUMN coordinates.footprintgeometry_dwc; Type: COMMENT; Schema: public; Owner: -
804
--
805
806
807
808
809
--
810 6250 aaronmk
-- Name: COLUMN coordinates.coordsaccuracy_m; Type: COMMENT; Schema: public; Owner: -
811 5862 aaronmk
--
812
813
814
815
816
--
817 6435 aaronmk
-- Name: cultivated_family_locations; Type: TABLE; Schema: public; Owner: -; Tablespace:
818
--
819
820
CREATE TABLE cultivated_family_locations (
821
    family varchar(255) NOT NULL,
822
    country varchar(255) NOT NULL
823
);
824
825
826
--
827 6039 aaronmk
-- Name: family_higher_plant_group; Type: TABLE; Schema: public; Owner: -; Tablespace:
828
--
829
830
CREATE TABLE family_higher_plant_group (
831 6429 aaronmk
    family varchar(255) NOT NULL,
832
    higher_plant_group varchar(255)
833 6039 aaronmk
);
834
835
836
--
837 4391 aaronmk
-- Name: location; Type: TABLE; Schema: public; Owner: -; Tablespace:
838 689 aaronmk
--
839
840 4391 aaronmk
CREATE TABLE location (
841
    location_id int(11) NOT NULL,
842 6179 aaronmk
    source_id int(11) NOT NULL,
843 6429 aaronmk
    sourceaccessioncode varchar(255),
844 4391 aaronmk
    parent_id int(11),
845 6429 aaronmk
    authorlocationcode varchar(255),
846
    accesslevel varchar(255),
847
    accessconditions varchar(255),
848 4753 aaronmk
    sublocationxposition_m double precision,
849
    sublocationyposition_m double precision,
850 6312 aaronmk
    iscultivated int(1),
851 6429 aaronmk
    authorzone varchar(255),
852
    authordatum varchar(255),
853
    authorlocation varchar(255),
854
    locationnarrative varchar(255),
855 4391 aaronmk
    azimuth double precision,
856 6429 aaronmk
    shape varchar(255),
857 4753 aaronmk
    area_m2 double precision,
858 6429 aaronmk
    standsize varchar(255),
859
    placementmethod varchar(255),
860 4391 aaronmk
    permanence int(1),
861 6429 aaronmk
    layoutnarrative varchar(255),
862 4753 aaronmk
    elevation_m double precision,
863
    elevationaccuracy_m double precision,
864
    elevationrange_m double precision,
865 6429 aaronmk
    verbatimelevation varchar(255),
866 4753 aaronmk
    slopeaspect_deg double precision,
867
    minslopeaspect_deg double precision,
868
    maxslopeaspect_deg double precision,
869 4787 aaronmk
    slopegradient_fraction double precision,
870
    minslopegradient_fraction double precision,
871
    maxslopegradient_fraction double precision,
872 6429 aaronmk
    topoposition varchar(255),
873
    landform varchar(255),
874
    surficialdeposits varchar(255),
875
    rocktype varchar(255),
876
    submitter_surname varchar(255),
877
    submitter_givenname varchar(255),
878
    submitter_email varchar(255),
879 4391 aaronmk
    notespublic int(1),
880
    notesmgt int(1),
881
    revisions int(1),
882 5499 aaronmk
    dateentered date ,
883 6429 aaronmk
    locationrationalenarrative varchar(255),
884
    accessioncode varchar(255)
885 689 aaronmk
);
886
887
888
--
889 4391 aaronmk
-- Name: TABLE location; Type: COMMENT; Schema: public; Owner: -
890 689 aaronmk
--
891
892
893
894
895
--
896 4391 aaronmk
-- Name: locationevent; Type: TABLE; Schema: public; Owner: -; Tablespace:
897 689 aaronmk
--
898
899 4391 aaronmk
CREATE TABLE locationevent (
900
    locationevent_id int(11) NOT NULL,
901 6179 aaronmk
    source_id int(11) NOT NULL,
902 6429 aaronmk
    sourceaccessioncode varchar(255),
903
    accesslevel varchar(255),
904 4391 aaronmk
    parent_id int(11),
905 4462 aaronmk
    location_id int(11),
906 4391 aaronmk
    project_id int(11),
907 6429 aaronmk
    authoreventcode varchar(255),
908 4391 aaronmk
    previous_id int(11),
909 5506 aaronmk
    obsstartdate date,
910
    obsenddate date,
911 6429 aaronmk
    dateaccuracy varchar(255),
912 4391 aaronmk
    method_id int(11),
913 4753 aaronmk
    temperature_c double precision,
914
    precipitation_m double precision,
915 4391 aaronmk
    autotaxoncover int(1),
916 6429 aaronmk
    originaldata varchar(255),
917
    effortlevel varchar(255),
918
    floristicquality varchar(255),
919
    bryophytequality varchar(255),
920
    lichenquality varchar(255),
921
    locationeventnarrative varchar(255),
922
    landscapenarrative varchar(255),
923
    homogeneity varchar(255),
924
    phenologicaspect varchar(255),
925
    representativeness varchar(255),
926
    standmaturity varchar(255),
927
    successionalstatus varchar(255),
928 4391 aaronmk
    basalarea double precision,
929 6429 aaronmk
    hydrologicregime varchar(255),
930
    soilmoistureregime varchar(255),
931
    soildrainage varchar(255),
932
    watersalinity varchar(255),
933 4753 aaronmk
    waterdepth_m double precision,
934 4391 aaronmk
    shoredistance double precision,
935
    soildepth double precision,
936
    organicdepth double precision,
937
    soiltaxon_id int(11),
938 6429 aaronmk
    soiltaxonsrc varchar(255),
939 4391 aaronmk
    percentbedrock double precision,
940
    percentrockgravel double precision,
941
    percentwood double precision,
942
    percentlitter double precision,
943
    percentbaresoil double precision,
944
    percentwater double precision,
945
    percentother double precision,
946 6429 aaronmk
    nameother varchar(255),
947 4391 aaronmk
    treeht double precision,
948
    shrubht double precision,
949
    fieldht double precision,
950
    nonvascularht double precision,
951
    submergedht double precision,
952
    treecover double precision,
953
    shrubcover double precision,
954
    fieldcover double precision,
955
    nonvascularcover double precision,
956
    floatingcover double precision,
957
    submergedcover double precision,
958 6429 aaronmk
    dominantstratum varchar(255),
959
    growthform1type varchar(255),
960
    growthform2type varchar(255),
961
    growthform3type varchar(255),
962 4391 aaronmk
    growthform1cover double precision,
963
    growthform2cover double precision,
964
    growthform3cover double precision,
965
    totalcover double precision,
966
    notespublic int(1),
967
    notesmgt int(1),
968
    revisions int(1),
969 5499 aaronmk
    dateentered date ,
970 6429 aaronmk
    toptaxon1name varchar(255),
971
    toptaxon2name varchar(255),
972
    toptaxon3name varchar(255),
973
    toptaxon4name varchar(255),
974
    toptaxon5name varchar(255),
975 4391 aaronmk
    numberoftaxa int(11),
976 6429 aaronmk
    accessioncode varchar(255)
977 4391 aaronmk
);
978 689 aaronmk
979
980 4391 aaronmk
--
981
-- Name: TABLE locationevent; Type: COMMENT; Schema: public; Owner: -
982
--
983 689 aaronmk
984 4391 aaronmk
985
986
987 689 aaronmk
--
988 4726 aaronmk
-- Name: locationplace; Type: TABLE; Schema: public; Owner: -; Tablespace:
989
--
990
991
CREATE TABLE locationplace (
992
    locationplace_id int(11) NOT NULL,
993
    location_id int(11) NOT NULL,
994 5855 aaronmk
    place_id int(11) NOT NULL,
995 4734 aaronmk
    identifier_id int(11)
996 4726 aaronmk
);
997
998
999
--
1000
-- Name: TABLE locationplace; Type: COMMENT; Schema: public; Owner: -
1001
--
1002
1003
1004
1005
1006
--
1007 4391 aaronmk
-- Name: method; Type: TABLE; Schema: public; Owner: -; Tablespace:
1008 689 aaronmk
--
1009
1010 4391 aaronmk
CREATE TABLE method (
1011
    method_id int(11) NOT NULL,
1012 6179 aaronmk
    source_id int(11) NOT NULL,
1013 6429 aaronmk
    name varchar(255),
1014
    description varchar(255),
1015 4754 aaronmk
    diameterheight_m double precision,
1016
    mindiameter_m double precision,
1017
    maxdiameter_m double precision,
1018
    minheight_m double precision,
1019
    maxheight_m double precision,
1020 6429 aaronmk
    observationtype varchar(255),
1021
    observationmeasure varchar(255),
1022 4391 aaronmk
    covermethod_id int(11),
1023
    samplingfactor double precision DEFAULT 1 NOT NULL,
1024 6429 aaronmk
    coverbasis varchar(255),
1025
    stemsamplemethod varchar(255),
1026
    shape varchar(255),
1027 4754 aaronmk
    length_m double precision,
1028
    width_m double precision,
1029
    radius_m double precision,
1030
    area_m2 double precision,
1031
    samplearea_m2 double precision,
1032
    subplotspacing_m double precision,
1033 4391 aaronmk
    subplotmethod_id int(11),
1034
    pointsperline int(11),
1035 6429 aaronmk
    accessioncode varchar(255)
1036 689 aaronmk
);
1037
1038
1039
--
1040 4391 aaronmk
-- Name: TABLE method; Type: COMMENT; Schema: public; Owner: -
1041 689 aaronmk
--
1042
1043
1044
1045
1046
--
1047 6179 aaronmk
-- Name: COLUMN method.source_id; Type: COMMENT; Schema: public; Owner: -
1048 689 aaronmk
--
1049
1050
1051
1052
1053
--
1054 4391 aaronmk
-- Name: COLUMN method.name; Type: COMMENT; Schema: public; Owner: -
1055 689 aaronmk
--
1056
1057
1058
1059 4391 aaronmk
1060 689 aaronmk
--
1061 4391 aaronmk
-- Name: COLUMN method.description; Type: COMMENT; Schema: public; Owner: -
1062 689 aaronmk
--
1063
1064
1065
1066
1067
--
1068 4754 aaronmk
-- Name: COLUMN method.diameterheight_m; Type: COMMENT; Schema: public; Owner: -
1069 689 aaronmk
--
1070
1071
1072
1073
1074
--
1075 4754 aaronmk
-- Name: COLUMN method.mindiameter_m; Type: COMMENT; Schema: public; Owner: -
1076 689 aaronmk
--
1077
1078
1079
1080 4391 aaronmk
1081 689 aaronmk
--
1082 4754 aaronmk
-- Name: COLUMN method.maxdiameter_m; Type: COMMENT; Schema: public; Owner: -
1083 689 aaronmk
--
1084
1085
1086
1087
1088
--
1089 4754 aaronmk
-- Name: COLUMN method.minheight_m; Type: COMMENT; Schema: public; Owner: -
1090 689 aaronmk
--
1091
1092
1093
1094
1095
--
1096 4754 aaronmk
-- Name: COLUMN method.maxheight_m; Type: COMMENT; Schema: public; Owner: -
1097 689 aaronmk
--
1098
1099
1100
1101 4391 aaronmk
1102 689 aaronmk
--
1103 4391 aaronmk
-- Name: COLUMN method.observationtype; Type: COMMENT; Schema: public; Owner: -
1104 689 aaronmk
--
1105
1106
1107
1108
1109
--
1110 4391 aaronmk
-- Name: COLUMN method.observationmeasure; Type: COMMENT; Schema: public; Owner: -
1111 689 aaronmk
--
1112
1113
1114
1115
1116
--
1117 4391 aaronmk
-- Name: COLUMN method.samplingfactor; Type: COMMENT; Schema: public; Owner: -
1118 689 aaronmk
--
1119
1120
1121
1122 4391 aaronmk
1123 689 aaronmk
--
1124 4391 aaronmk
-- Name: COLUMN method.coverbasis; Type: COMMENT; Schema: public; Owner: -
1125 689 aaronmk
--
1126
1127
1128
1129
1130
--
1131 4391 aaronmk
-- Name: COLUMN method.stemsamplemethod; Type: COMMENT; Schema: public; Owner: -
1132 689 aaronmk
--
1133
1134
1135
1136
1137
--
1138 4391 aaronmk
-- Name: COLUMN method.shape; Type: COMMENT; Schema: public; Owner: -
1139 689 aaronmk
--
1140
1141 4391 aaronmk
1142
1143
1144
--
1145 4754 aaronmk
-- Name: COLUMN method.samplearea_m2; Type: COMMENT; Schema: public; Owner: -
1146 4391 aaronmk
--
1147
1148
1149
1150
1151
--
1152 4754 aaronmk
-- Name: COLUMN method.subplotspacing_m; Type: COMMENT; Schema: public; Owner: -
1153 4391 aaronmk
--
1154
1155
1156
1157
1158
--
1159
-- Name: COLUMN method.subplotmethod_id; Type: COMMENT; Schema: public; Owner: -
1160
--
1161
1162
1163
1164
1165
--
1166
-- Name: COLUMN method.pointsperline; Type: COMMENT; Schema: public; Owner: -
1167
--
1168
1169
1170
1171
1172
--
1173 4730 aaronmk
-- Name: party; Type: TABLE; Schema: public; Owner: -; Tablespace:
1174 4391 aaronmk
--
1175
1176 4730 aaronmk
CREATE TABLE party (
1177
    party_id int(11) NOT NULL,
1178 6179 aaronmk
    source_id int(11) NOT NULL,
1179 6429 aaronmk
    fullname varchar(255),
1180
    salutation varchar(255),
1181
    givenname varchar(255),
1182
    middlename varchar(255),
1183
    surname varchar(255),
1184
    suffix varchar(255),
1185
    department varchar(255),
1186
    organizationname varchar(255),
1187 4730 aaronmk
    currentname_id int(11),
1188 6429 aaronmk
    contactinstructions varchar(255),
1189
    email varchar(255),
1190
    partytype varchar(255),
1191 4730 aaronmk
    partypublic int(1) DEFAULT true,
1192 6429 aaronmk
    accessioncode varchar(255)
1193 4730 aaronmk
);
1194
1195
1196
--
1197 4391 aaronmk
-- Name: plantobservation; Type: TABLE; Schema: public; Owner: -; Tablespace:
1198 689 aaronmk
--
1199
1200 4391 aaronmk
CREATE TABLE plantobservation (
1201
    plantobservation_id int(11) NOT NULL,
1202 6179 aaronmk
    source_id int(11) NOT NULL,
1203 6429 aaronmk
    sourceaccessioncode varchar(255),
1204 5770 aaronmk
    aggregateoccurrence_id int(11),
1205 4753 aaronmk
    overallheight_m double precision,
1206
    overallheightaccuracy_m double precision,
1207 6429 aaronmk
    collectionnumber varchar(255),
1208 4391 aaronmk
    stemcount int(11),
1209
    plant_id int(11),
1210 6429 aaronmk
    accessioncode varchar(255)
1211 4391 aaronmk
);
1212 689 aaronmk
1213
1214 4391 aaronmk
--
1215
-- Name: TABLE plantobservation; Type: COMMENT; Schema: public; Owner: -
1216
--
1217 689 aaronmk
1218 4391 aaronmk
1219
1220
1221 689 aaronmk
--
1222 4391 aaronmk
-- Name: COLUMN plantobservation.collectionnumber; Type: COMMENT; Schema: public; Owner: -
1223 689 aaronmk
--
1224
1225
1226
1227
1228
--
1229 6179 aaronmk
-- Name: source; Type: TABLE; Schema: public; Owner: -; Tablespace:
1230 5961 aaronmk
--
1231
1232 6179 aaronmk
CREATE TABLE source (
1233
    source_id int(11) NOT NULL,
1234 6302 aaronmk
    matched_source_id int(11),
1235 6296 aaronmk
    parent_id int(11),
1236 6429 aaronmk
    shortname varchar(255) NOT NULL,
1237
    citation varchar(255),
1238
    sourcetype varchar(255),
1239
    accesslevel varchar(255),
1240
    accessconditions varchar(255),
1241
    title varchar(255),
1242
    titlesuperior varchar(255),
1243
    volume varchar(255),
1244
    issue varchar(255),
1245
    pagerange varchar(255),
1246 5961 aaronmk
    totalpages int(11),
1247 6429 aaronmk
    publisher varchar(255),
1248
    publicationplace varchar(255),
1249
    isbn varchar(255),
1250
    edition varchar(255),
1251 5961 aaronmk
    numberofvolumes int(11),
1252
    chapternumber int(11),
1253
    reportnumber int(11),
1254 6429 aaronmk
    communicationtype varchar(255),
1255
    degree varchar(255),
1256
    url varchar(255),
1257
    doi varchar(255),
1258
    additionalinfo varchar(255),
1259 5961 aaronmk
    pubdate date,
1260
    accessdate date,
1261
    conferencedate date,
1262 6429 aaronmk
    accessioncode varchar(255)
1263 5961 aaronmk
);
1264
1265
1266
--
1267 5748 aaronmk
-- Name: stemobservation; Type: TABLE; Schema: public; Owner: -; Tablespace:
1268
--
1269
1270
CREATE TABLE stemobservation (
1271
    stemobservation_id int(11) NOT NULL,
1272 6179 aaronmk
    source_id int(11) NOT NULL,
1273 6429 aaronmk
    sourceaccessioncode varchar(255),
1274 5748 aaronmk
    plantobservation_id int(11) NOT NULL,
1275 6429 aaronmk
    authorstemcode varchar(255),
1276
    tag varchar(255),
1277
    tags varchar(255),
1278 5748 aaronmk
    xposition_m double precision,
1279
    yposition_m double precision,
1280
    diameterbreastheight_m double precision,
1281
    basaldiameter_m double precision,
1282
    diameteraccuracy_m double precision,
1283
    height_m double precision,
1284
    heightfirstbranch_m double precision,
1285
    heightaccuracy_m double precision,
1286 6429 aaronmk
    health varchar(255),
1287 5748 aaronmk
    age double precision,
1288 6429 aaronmk
    accessioncode varchar(255)
1289 5748 aaronmk
);
1290
1291
1292
--
1293
-- Name: TABLE stemobservation; Type: COMMENT; Schema: public; Owner: -
1294
--
1295
1296
1297
1298
1299
--
1300
-- Name: COLUMN stemobservation.tags; Type: COMMENT; Schema: public; Owner: -
1301
--
1302
1303
1304
1305
1306
--
1307 5225 aaronmk
-- Name: taxondetermination; Type: TABLE; Schema: public; Owner: -; Tablespace:
1308 4964 aaronmk
--
1309
1310 5225 aaronmk
CREATE TABLE taxondetermination (
1311
    taxondetermination_id int(11) NOT NULL,
1312
    taxonoccurrence_id int(11) NOT NULL,
1313 5657 aaronmk
    taxonverbatim_id int(11) NOT NULL,
1314 5225 aaronmk
    party_id int(11),
1315 6429 aaronmk
    role varchar(255) DEFAULT 'unknown' NOT NULL,
1316
    determinationtype varchar(255),
1317 6179 aaronmk
    source_id int(11),
1318 5225 aaronmk
    isoriginal int(1) DEFAULT false NOT NULL,
1319
    iscurrent int(1) DEFAULT false NOT NULL,
1320 6429 aaronmk
    taxonfit varchar(255),
1321
    taxonconfidence varchar(255),
1322
    grouptype varchar(255),
1323
    notes varchar(255),
1324 5225 aaronmk
    notespublic int(1),
1325
    notesmgt int(1),
1326
    revisions int(1),
1327 5499 aaronmk
    determinationdate date,
1328 6429 aaronmk
    accessioncode varchar(255)
1329 5225 aaronmk
);
1330 4964 aaronmk
1331
1332
--
1333 5225 aaronmk
-- Name: TABLE taxondetermination; Type: COMMENT; Schema: public; Owner: -
1334 4964 aaronmk
--
1335
1336
1337
1338
1339
--
1340 5225 aaronmk
-- Name: taxonoccurrence; Type: TABLE; Schema: public; Owner: -; Tablespace:
1341 4964 aaronmk
--
1342
1343 5225 aaronmk
CREATE TABLE taxonoccurrence (
1344
    taxonoccurrence_id int(11) NOT NULL,
1345 6179 aaronmk
    source_id int(11) NOT NULL,
1346 6429 aaronmk
    sourceaccessioncode varchar(255),
1347 5225 aaronmk
    locationevent_id int(11),
1348 6429 aaronmk
    authortaxoncode varchar(255),
1349 6171 aaronmk
    collector_id int(11),
1350 6429 aaronmk
    growthform varchar(255),
1351 5225 aaronmk
    iscultivated int(1),
1352 6429 aaronmk
    cultivatedbasis varchar(255),
1353 5225 aaronmk
    isnative int(1),
1354 6429 aaronmk
    accessioncode varchar(255)
1355 5225 aaronmk
);
1356 4964 aaronmk
1357
1358
--
1359 5225 aaronmk
-- Name: TABLE taxonoccurrence; Type: COMMENT; Schema: public; Owner: -
1360 4964 aaronmk
--
1361
1362
1363
1364
1365
--
1366 5225 aaronmk
-- Name: COLUMN taxonoccurrence.iscultivated; Type: COMMENT; Schema: public; Owner: -
1367 5200 aaronmk
--
1368
1369
1370
1371
1372
--
1373 5225 aaronmk
-- Name: COLUMN taxonoccurrence.cultivatedbasis; Type: COMMENT; Schema: public; Owner: -
1374 4933 aaronmk
--
1375
1376
1377
1378
1379
--
1380 5225 aaronmk
-- Name: COLUMN taxonoccurrence.isnative; Type: COMMENT; Schema: public; Owner: -
1381 4934 aaronmk
--
1382
1383
1384
1385
1386
--
1387 5655 aaronmk
-- Name: taxonverbatim; Type: TABLE; Schema: public; Owner: -; Tablespace:
1388
--
1389
1390
CREATE TABLE taxonverbatim (
1391 5660 aaronmk
    taxonverbatim_id int(11) NOT NULL,
1392 5655 aaronmk
    taxonlabel_id int(11) NOT NULL,
1393 6429 aaronmk
    verbatimrank varchar(255),
1394
    taxonomicname varchar(255),
1395
    taxonname varchar(255),
1396
    author varchar(255),
1397
    family varchar(255),
1398
    genus varchar(255),
1399
    specific_epithet varchar(255),
1400
    morphospecies varchar(255),
1401
    growthform varchar(255),
1402
    description varchar(255)
1403 5655 aaronmk
);
1404
1405
1406
--
1407
-- Name: TABLE taxonverbatim; Type: COMMENT; Schema: public; Owner: -
1408
--
1409
1410
1411
1412
1413
--
1414
-- Name: COLUMN taxonverbatim.verbatimrank; Type: COMMENT; Schema: public; Owner: -
1415
--
1416
1417
1418
1419
1420
--
1421
-- Name: COLUMN taxonverbatim.taxonomicname; Type: COMMENT; Schema: public; Owner: -
1422
--
1423
1424
1425
1426
1427
--
1428 5948 aaronmk
-- Name: COLUMN taxonverbatim.taxonname; Type: COMMENT; Schema: public; Owner: -
1429 5655 aaronmk
--
1430
1431
1432
1433
1434
--
1435
-- Name: COLUMN taxonverbatim.author; Type: COMMENT; Schema: public; Owner: -
1436
--
1437
1438
1439
1440
1441
--
1442
-- Name: COLUMN taxonverbatim.family; Type: COMMENT; Schema: public; Owner: -
1443
--
1444
1445
1446
1447
1448
--
1449
-- Name: COLUMN taxonverbatim.genus; Type: COMMENT; Schema: public; Owner: -
1450
--
1451
1452
1453
1454
1455
--
1456 5783 aaronmk
-- Name: COLUMN taxonverbatim.specific_epithet; Type: COMMENT; Schema: public; Owner: -
1457 5655 aaronmk
--
1458
1459
1460
1461
1462
--
1463 5666 aaronmk
-- Name: COLUMN taxonverbatim.morphospecies; Type: COMMENT; Schema: public; Owner: -
1464
--
1465
1466
1467
1468
1469
--
1470 6092 aaronmk
-- Name: threatened_taxonlabel; Type: TABLE; Schema: public; Owner: -; Tablespace:
1471
--
1472
1473
CREATE TABLE threatened_taxonlabel (
1474
    taxonlabel_id int(11) NOT NULL
1475
);
1476
1477
1478
--
1479 5865 aaronmk
-- Name: analytical_stem_view; Type: VIEW; Schema: public; Owner: -
1480 689 aaronmk
--
1481
1482
1483
1484 6420 aaronmk
1485 4391 aaronmk
--
1486
-- Name: classcontributor; Type: TABLE; Schema: public; Owner: -; Tablespace:
1487 689 aaronmk
--
1488
1489 4391 aaronmk
CREATE TABLE classcontributor (
1490
    classcontributor_id int(11) NOT NULL,
1491
    commclass_id int(11) NOT NULL,
1492
    party_id int(11) NOT NULL,
1493 6429 aaronmk
    role varchar(255)
1494 689 aaronmk
);
1495
1496
1497
--
1498 4391 aaronmk
-- Name: classcontributor_classcontributor_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1499 689 aaronmk
--
1500
1501
1502
1503
1504
--
1505 4391 aaronmk
-- Name: classcontributor_classcontributor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1506 689 aaronmk
--
1507
1508
1509
1510
1511
--
1512 6029 aaronmk
-- Name: classcontributor_classcontributor_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1513
--
1514
1515
1516
1517
--
1518 4391 aaronmk
-- Name: commclass; Type: TABLE; Schema: public; Owner: -; Tablespace:
1519 689 aaronmk
--
1520
1521 4391 aaronmk
CREATE TABLE commclass (
1522
    commclass_id int(11) NOT NULL,
1523 689 aaronmk
    locationevent_id int(11) NOT NULL,
1524 4391 aaronmk
    inspection int(1),
1525
    tableanalysis int(1),
1526
    multivariateanalysis int(1),
1527
    classpublication_id int(11),
1528 6429 aaronmk
    classnotes varchar(255),
1529
    commname varchar(255),
1530
    commcode varchar(255),
1531
    commframework varchar(255),
1532
    commlevel varchar(255),
1533 5499 aaronmk
    classstartdate date,
1534
    classstopdate date,
1535 6429 aaronmk
    expertsystem varchar(255),
1536
    accessioncode varchar(255)
1537 689 aaronmk
);
1538
1539
1540
--
1541 4391 aaronmk
-- Name: commclass_commclass_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1542 689 aaronmk
--
1543
1544
1545
1546
1547
--
1548 4391 aaronmk
-- Name: commclass_commclass_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1549 689 aaronmk
--
1550
1551
1552
1553
1554
--
1555 6029 aaronmk
-- Name: commclass_commclass_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1556
--
1557
1558
1559
1560
--
1561 4391 aaronmk
-- Name: commconcept; Type: TABLE; Schema: public; Owner: -; Tablespace:
1562 689 aaronmk
--
1563
1564 4391 aaronmk
CREATE TABLE commconcept (
1565
    commconcept_id int(11) NOT NULL,
1566
    commname_id int(11) NOT NULL,
1567 6179 aaronmk
    source_id int(11),
1568 6429 aaronmk
    commdescription varchar(255),
1569
    commname varchar(255),
1570
    accessioncode varchar(255)
1571 689 aaronmk
);
1572
1573
1574
--
1575 4391 aaronmk
-- Name: commconcept_commconcept_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1576 1020 aaronmk
--
1577
1578
1579
1580
1581
--
1582 4391 aaronmk
-- Name: commconcept_commconcept_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1583 689 aaronmk
--
1584
1585
1586
1587
1588
--
1589 6029 aaronmk
-- Name: commconcept_commconcept_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1590
--
1591
1592
1593
1594
--
1595 4391 aaronmk
-- Name: commcorrelation; Type: TABLE; Schema: public; Owner: -; Tablespace:
1596 689 aaronmk
--
1597
1598 4391 aaronmk
CREATE TABLE commcorrelation (
1599
    commcorrelation_id int(11) NOT NULL,
1600
    commstatus_id int(11) NOT NULL,
1601
    commconcept_id int(11) NOT NULL,
1602 6429 aaronmk
    commconvergence varchar(255) NOT NULL,
1603 5499 aaronmk
    correlationstart date NOT NULL,
1604
    correlationstop date
1605 4391 aaronmk
);
1606 689 aaronmk
1607
1608 4391 aaronmk
--
1609
-- Name: commcorrelation_commcorrelation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1610
--
1611 689 aaronmk
1612 4391 aaronmk
1613
1614
1615 689 aaronmk
--
1616 4391 aaronmk
-- Name: commcorrelation_commcorrelation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1617 906 aaronmk
--
1618
1619 4391 aaronmk
1620
1621
1622
--
1623 6029 aaronmk
-- Name: commcorrelation_commcorrelation_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1624
--
1625
1626
1627
1628
--
1629 4391 aaronmk
-- Name: commdetermination; Type: TABLE; Schema: public; Owner: -; Tablespace:
1630
--
1631
1632
CREATE TABLE commdetermination (
1633
    commdetermination_id int(11) NOT NULL,
1634
    commclass_id int(11) NOT NULL,
1635
    commconcept_id int(11) NOT NULL,
1636 6429 aaronmk
    commcode varchar(255),
1637
    commname varchar(255),
1638
    classfit varchar(255),
1639
    classconfidence varchar(255),
1640 4391 aaronmk
    commauthority_id int(11),
1641 6429 aaronmk
    notes varchar(255),
1642 4391 aaronmk
    type int(1),
1643
    nomenclaturaltype int(1)
1644 906 aaronmk
);
1645
1646
1647
--
1648 4391 aaronmk
-- Name: commdetermination_commdetermination_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1649 1021 aaronmk
--
1650
1651
1652
1653
1654
--
1655 4391 aaronmk
-- Name: commdetermination_commdetermination_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1656 1022 aaronmk
--
1657
1658
1659
1660
1661
--
1662 6029 aaronmk
-- Name: commdetermination_commdetermination_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1663
--
1664
1665
1666
1667
--
1668 4391 aaronmk
-- Name: commlineage; Type: TABLE; Schema: public; Owner: -; Tablespace:
1669 1020 aaronmk
--
1670
1671 4391 aaronmk
CREATE TABLE commlineage (
1672
    commlineage_id int(11) NOT NULL,
1673
    parentcommstatus_id int(11) NOT NULL,
1674
    childcommstatus_id int(11) NOT NULL
1675
);
1676 1020 aaronmk
1677
1678
--
1679 4391 aaronmk
-- Name: commlineage_commlineage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1680 906 aaronmk
--
1681
1682
1683
1684
1685
--
1686 4391 aaronmk
-- Name: commlineage_commlineage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1687 906 aaronmk
--
1688
1689
1690
1691
1692
--
1693 6029 aaronmk
-- Name: commlineage_commlineage_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1694
--
1695
1696
1697
1698
--
1699 4391 aaronmk
-- Name: commname; Type: TABLE; Schema: public; Owner: -; Tablespace:
1700 689 aaronmk
--
1701
1702 4391 aaronmk
CREATE TABLE commname (
1703
    commname_id int(11) NOT NULL,
1704 6429 aaronmk
    commname varchar(255) NOT NULL,
1705 6179 aaronmk
    source_id int(11),
1706 5499 aaronmk
    dateentered date
1707 689 aaronmk
);
1708
1709
1710
--
1711 4391 aaronmk
-- Name: commname_commname_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1712 689 aaronmk
--
1713
1714
1715
1716
1717
--
1718 4391 aaronmk
-- Name: commname_commname_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1719 689 aaronmk
--
1720
1721
1722
1723
1724
--
1725 6029 aaronmk
-- Name: commname_commname_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1726
--
1727
1728
1729
1730
--
1731 4391 aaronmk
-- Name: commstatus; Type: TABLE; Schema: public; Owner: -; Tablespace:
1732 689 aaronmk
--
1733
1734 4391 aaronmk
CREATE TABLE commstatus (
1735
    commstatus_id int(11) NOT NULL,
1736
    commconcept_id int(11) NOT NULL,
1737 6179 aaronmk
    source_id int(11),
1738 6429 aaronmk
    commconceptstatus varchar(255) NOT NULL,
1739 4391 aaronmk
    commparent_id int(11),
1740 6429 aaronmk
    commlevel varchar(255),
1741
    commpartycomments varchar(255),
1742 4391 aaronmk
    party_id int(11) NOT NULL,
1743 5499 aaronmk
    startdate date NOT NULL,
1744
    stopdate date,
1745 6429 aaronmk
    accessioncode varchar(255)
1746 4391 aaronmk
);
1747 689 aaronmk
1748
1749 4391 aaronmk
--
1750
-- Name: commstatus_commstatus_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1751
--
1752 689 aaronmk
1753 4391 aaronmk
1754
1755
1756 689 aaronmk
--
1757 4391 aaronmk
-- Name: commstatus_commstatus_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1758 689 aaronmk
--
1759
1760 4391 aaronmk
1761
1762
1763
--
1764 6029 aaronmk
-- Name: commstatus_commstatus_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1765
--
1766
1767
1768
1769
--
1770 4391 aaronmk
-- Name: commusage; Type: TABLE; Schema: public; Owner: -; Tablespace:
1771
--
1772
1773
CREATE TABLE commusage (
1774
    commusage_id int(11) NOT NULL,
1775
    commname_id int(11) NOT NULL,
1776 6429 aaronmk
    commname varchar(255),
1777 4391 aaronmk
    commconcept_id int(11),
1778 6429 aaronmk
    commnamestatus varchar(255),
1779
    classsystem varchar(255),
1780 4391 aaronmk
    party_id int(11),
1781
    commstatus_id int(11),
1782 5499 aaronmk
    usagestart date,
1783
    usagestop date
1784 689 aaronmk
);
1785
1786
1787
--
1788 4391 aaronmk
-- Name: commusage_commusage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1789 689 aaronmk
--
1790
1791
1792
1793
1794
--
1795 4391 aaronmk
-- Name: commusage_commusage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1796 689 aaronmk
--
1797
1798
1799
1800
1801
--
1802 6029 aaronmk
-- Name: commusage_commusage_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1803
--
1804
1805
1806
1807
--
1808 5859 aaronmk
-- Name: coordinates_coordinates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1809
--
1810
1811
1812
1813
1814
--
1815
-- Name: coordinates_coordinates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1816
--
1817
1818
1819
1820
1821
--
1822 6029 aaronmk
-- Name: coordinates_coordinates_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1823
--
1824
1825
1826
1827
--
1828 4391 aaronmk
-- Name: coverindex; Type: TABLE; Schema: public; Owner: -; Tablespace:
1829 689 aaronmk
--
1830
1831 4391 aaronmk
CREATE TABLE coverindex (
1832
    coverindex_id int(11) NOT NULL,
1833
    covermethod_id int(11) NOT NULL,
1834 6429 aaronmk
    covercode varchar(255) NOT NULL,
1835 4391 aaronmk
    upperlimit double precision,
1836
    lowerlimit double precision,
1837
    coverpercent double precision NOT NULL,
1838 6429 aaronmk
    indexdescription varchar(255)
1839 689 aaronmk
);
1840
1841
1842
--
1843 4391 aaronmk
-- Name: coverindex_coverindex_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1844 689 aaronmk
--
1845
1846
1847
1848
1849
--
1850 4391 aaronmk
-- Name: coverindex_coverindex_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1851 689 aaronmk
--
1852
1853
1854
1855
1856
--
1857 6029 aaronmk
-- Name: coverindex_coverindex_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1858
--
1859
1860
1861
1862
--
1863 4391 aaronmk
-- Name: covermethod; Type: TABLE; Schema: public; Owner: -; Tablespace:
1864 907 aaronmk
--
1865
1866 4391 aaronmk
CREATE TABLE covermethod (
1867
    covermethod_id int(11) NOT NULL,
1868 6179 aaronmk
    source_id int(11),
1869 6429 aaronmk
    covertype varchar(255) NOT NULL,
1870
    coverestimationmethod varchar(255),
1871
    accessioncode varchar(255)
1872 907 aaronmk
);
1873
1874
1875
--
1876 4391 aaronmk
-- Name: covermethod_covermethod_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1877 1039 aaronmk
--
1878
1879
1880
1881
1882
--
1883 4391 aaronmk
-- Name: covermethod_covermethod_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1884 1100 aaronmk
--
1885
1886
1887
1888
1889
--
1890 6029 aaronmk
-- Name: covermethod_covermethod_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1891
--
1892
1893
1894
1895
--
1896 4391 aaronmk
-- Name: dba_preassignacccode_dba_requestnumber_seq; Type: SEQUENCE; Schema: public; Owner: -
1897 1064 aaronmk
--
1898
1899
1900
1901
1902
--
1903 6029 aaronmk
-- Name: dba_preassignacccode_dba_requestnumber_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1904
--
1905
1906
1907
1908
--
1909 4391 aaronmk
-- Name: definedvalue; Type: TABLE; Schema: public; Owner: -; Tablespace:
1910 1064 aaronmk
--
1911
1912 4391 aaronmk
CREATE TABLE definedvalue (
1913
    definedvalue_id int(11) NOT NULL,
1914
    userdefined_id int(11) NOT NULL,
1915
    tablerecord_id int(11) NOT NULL,
1916 6429 aaronmk
    definedvalue varchar(255)
1917 4391 aaronmk
);
1918 1064 aaronmk
1919
1920
--
1921 4391 aaronmk
-- Name: definedvalue_definedvalue_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1922 1064 aaronmk
--
1923
1924
1925
1926
1927
--
1928 4391 aaronmk
-- Name: definedvalue_definedvalue_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1929 1064 aaronmk
--
1930
1931
1932
1933
1934
--
1935 6029 aaronmk
-- Name: definedvalue_definedvalue_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1936
--
1937
1938
1939
1940
--
1941 4391 aaronmk
-- Name: disturbanceobs; Type: TABLE; Schema: public; Owner: -; Tablespace:
1942 1064 aaronmk
--
1943
1944 4391 aaronmk
CREATE TABLE disturbanceobs (
1945
    disturbanceobs_id int(11) NOT NULL,
1946
    locationevent_id int(11) NOT NULL,
1947 6429 aaronmk
    disturbancetype varchar(255) NOT NULL,
1948
    disturbanceintensity varchar(255),
1949 4391 aaronmk
    disturbanceage double precision,
1950
    disturbanceextent double precision,
1951 6429 aaronmk
    disturbancecomment varchar(255)
1952 4391 aaronmk
);
1953 1064 aaronmk
1954
1955
--
1956 4391 aaronmk
-- Name: disturbanceobs_disturbanceobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1957 1112 aaronmk
--
1958
1959
1960
1961
1962
--
1963 4391 aaronmk
-- Name: disturbanceobs_disturbanceobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1964 1064 aaronmk
--
1965
1966
1967
1968
1969
--
1970 6029 aaronmk
-- Name: disturbanceobs_disturbanceobs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
1971
--
1972
1973
1974
1975
--
1976 5991 aaronmk
-- Name: geoscrub_input; Type: TABLE; Schema: public; Owner: -; Tablespace:
1977
--
1978
1979
CREATE TABLE geoscrub_input (
1980 6429 aaronmk
    country varchar(255),
1981
    `stateProvince` varchar(255),
1982
    county varchar(255),
1983 5991 aaronmk
    `decimalLatitude` double precision,
1984
    `decimalLongitude` double precision
1985
);
1986
1987
1988
--
1989
-- Name: geoscrub_input_view; Type: VIEW; Schema: public; Owner: -
1990
--
1991
1992
1993
1994
1995
--
1996 4391 aaronmk
-- Name: graphic; Type: TABLE; Schema: public; Owner: -; Tablespace:
1997 1034 aaronmk
--
1998
1999 4391 aaronmk
CREATE TABLE graphic (
2000
    graphic_id int(11) NOT NULL,
2001
    locationevent_id int(11) NOT NULL,
2002 6429 aaronmk
    graphicname varchar(255),
2003
    graphiclocation varchar(255),
2004
    graphicdescription varchar(255),
2005
    graphictype varchar(255),
2006 4391 aaronmk
    graphicdata int(11),
2007 5499 aaronmk
    graphicdate date,
2008 6429 aaronmk
    accessioncode varchar(255)
2009 4391 aaronmk
);
2010 1034 aaronmk
2011
2012
--
2013 4391 aaronmk
-- Name: graphic_graphic_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2014 1034 aaronmk
--
2015
2016
2017
2018
2019
--
2020 4391 aaronmk
-- Name: graphic_graphic_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2021 1034 aaronmk
--
2022
2023
2024
2025
2026
--
2027 6029 aaronmk
-- Name: graphic_graphic_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2028
--
2029
2030
2031
2032
--
2033 6030 aaronmk
-- Name: higher_plant_group_nodes; Type: TABLE; Schema: public; Owner: -; Tablespace:
2034
--
2035
2036
CREATE TABLE higher_plant_group_nodes (
2037 6429 aaronmk
    higher_plant_group varchar(255),
2038
    node_name varchar(255) NOT NULL
2039 6030 aaronmk
);
2040
2041
2042
--
2043 4391 aaronmk
-- Name: location_location_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2044 1034 aaronmk
--
2045
2046
2047
2048
2049
--
2050 4391 aaronmk
-- Name: location_location_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2051 1064 aaronmk
--
2052
2053
2054
2055
2056
--
2057 6029 aaronmk
-- Name: location_location_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2058
--
2059
2060
2061
2062
--
2063 4391 aaronmk
-- Name: locationevent_locationevent_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2064 1099 aaronmk
--
2065
2066
2067
2068
2069
--
2070 4391 aaronmk
-- Name: locationevent_locationevent_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2071 1099 aaronmk
--
2072
2073
2074
2075
2076
--
2077 6029 aaronmk
-- Name: locationevent_locationevent_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2078
--
2079
2080
2081
2082
--
2083 4391 aaronmk
-- Name: locationeventcontributor; Type: TABLE; Schema: public; Owner: -; Tablespace:
2084 1099 aaronmk
--
2085
2086 4391 aaronmk
CREATE TABLE locationeventcontributor (
2087
    locationeventcontributor_id int(11) NOT NULL,
2088
    locationevent_id int(11) NOT NULL,
2089
    party_id int(11) NOT NULL,
2090 6429 aaronmk
    role varchar(255) NOT NULL,
2091 5499 aaronmk
    contributiondate date
2092 4391 aaronmk
);
2093 1099 aaronmk
2094
2095
--
2096 4391 aaronmk
-- Name: locationeventcontributor_locationeventcontributor_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2097 1099 aaronmk
--
2098
2099
2100
2101
2102
--
2103 4391 aaronmk
-- Name: locationeventcontributor_locationeventcontributor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2104 1162 aaronmk
--
2105
2106
2107
2108
2109
--
2110 6029 aaronmk
-- Name: locationeventcontributor_locationeventcontributor_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2111
--
2112
2113
2114
2115
--
2116 4391 aaronmk
-- Name: locationeventsynonym; Type: TABLE; Schema: public; Owner: -; Tablespace:
2117 1162 aaronmk
--
2118
2119 4391 aaronmk
CREATE TABLE locationeventsynonym (
2120
    locationeventsynonym_id int(11) NOT NULL,
2121
    synonymlocationevent_id int(11) NOT NULL,
2122
    primarylocationevent_id int(11) NOT NULL,
2123
    party_id int(11) NOT NULL,
2124 6429 aaronmk
    role varchar(255) NOT NULL,
2125
    synonymcomment varchar(255),
2126 5499 aaronmk
    classstartdate date  NOT NULL,
2127
    classstopdate date,
2128 6429 aaronmk
    accessioncode varchar(255)
2129 4391 aaronmk
);
2130 1162 aaronmk
2131
2132 4391 aaronmk
--
2133
-- Name: locationeventsynonym_locationeventsynonym_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2134
--
2135 1162 aaronmk
2136 4391 aaronmk
2137
2138
2139 1162 aaronmk
--
2140 4391 aaronmk
-- Name: locationeventsynonym_locationeventsynonym_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2141 1168 aaronmk
--
2142
2143
2144
2145
2146
--
2147 6029 aaronmk
-- Name: locationeventsynonym_locationeventsynonym_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2148
--
2149
2150
2151
2152
--
2153 4726 aaronmk
-- Name: locationplace_locationplace_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2154
--
2155
2156
2157
2158
2159
--
2160
-- Name: locationplace_locationplace_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2161
--
2162
2163
2164
2165
2166
--
2167 6029 aaronmk
-- Name: locationplace_locationplace_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2168
--
2169
2170
2171
2172
--
2173 1101 aaronmk
-- Name: method_method_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2174 1099 aaronmk
--
2175
2176
2177
2178
2179
--
2180 1101 aaronmk
-- Name: method_method_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2181 1099 aaronmk
--
2182
2183
2184
2185
2186
--
2187 6029 aaronmk
-- Name: method_method_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2188
--
2189
2190
2191
2192
--
2193 1101 aaronmk
-- Name: methodtaxonclass; Type: TABLE; Schema: public; Owner: -; Tablespace:
2194
--
2195
2196
CREATE TABLE methodtaxonclass (
2197
    methodtaxonclass_id int(11) NOT NULL,
2198
    method_id int(11) NOT NULL,
2199 5608 aaronmk
    taxonlabel_id int(11),
2200 1152 aaronmk
    included int(1) NOT NULL,
2201 1160 aaronmk
    submethod_id int(11),
2202 6429 aaronmk
    taxonclass varchar(255)
2203 1101 aaronmk
);
2204
2205
2206
--
2207
-- Name: COLUMN methodtaxonclass.included; Type: COMMENT; Schema: public; Owner: -
2208
--
2209
2210
2211
2212
2213
--
2214 1105 aaronmk
-- Name: COLUMN methodtaxonclass.submethod_id; Type: COMMENT; Schema: public; Owner: -
2215
--
2216
2217
2218
2219
2220
--
2221 1101 aaronmk
-- Name: methodtaxonclass_methodtaxonclass_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2222
--
2223
2224
2225
2226
2227
--
2228
-- Name: methodtaxonclass_methodtaxonclass_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2229
--
2230
2231
2232
2233
2234
--
2235 6029 aaronmk
-- Name: methodtaxonclass_methodtaxonclass_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2236
--
2237
2238
2239
2240
--
2241 689 aaronmk
-- Name: note; Type: TABLE; Schema: public; Owner: -; Tablespace:
2242
--
2243
2244
CREATE TABLE note (
2245
    note_id int(11) NOT NULL,
2246
    notelink_id int(11) NOT NULL,
2247
    party_id int(11) NOT NULL,
2248 6429 aaronmk
    role varchar(255) NOT NULL,
2249
    notetype varchar(255) NOT NULL,
2250
    notetext varchar(255) NOT NULL,
2251 5499 aaronmk
    notedate date,
2252 6429 aaronmk
    accessioncode varchar(255)
2253 689 aaronmk
);
2254
2255
2256
--
2257
-- Name: note_note_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2258
--
2259
2260
2261
2262
2263
--
2264
-- Name: note_note_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2265
--
2266
2267
2268
2269
2270
--
2271 6029 aaronmk
-- Name: note_note_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2272
--
2273
2274
2275
2276
--
2277 689 aaronmk
-- Name: notelink; Type: TABLE; Schema: public; Owner: -; Tablespace:
2278
--
2279
2280
CREATE TABLE notelink (
2281
    notelink_id int(11) NOT NULL,
2282 6429 aaronmk
    tablename varchar(255) NOT NULL,
2283
    attributename varchar(255),
2284 689 aaronmk
    tablerecord int(11) NOT NULL
2285
);
2286
2287
2288
--
2289
-- Name: notelink_notelink_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2290
--
2291
2292
2293
2294
2295
--
2296
-- Name: notelink_notelink_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2297
--
2298
2299
2300
2301
2302
--
2303 6029 aaronmk
-- Name: notelink_notelink_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2304
--
2305
2306
2307
2308
--
2309 689 aaronmk
-- Name: party_party_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2310
--
2311
2312
2313
2314
2315
--
2316
-- Name: party_party_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2317
--
2318
2319
2320
2321
2322
--
2323 6029 aaronmk
-- Name: party_party_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2324
--
2325
2326
2327
2328
--
2329 689 aaronmk
-- Name: partymember; Type: TABLE; Schema: public; Owner: -; Tablespace:
2330
--
2331
2332
CREATE TABLE partymember (
2333
    partymember_id int(11) NOT NULL,
2334
    parentparty_id int(11) NOT NULL,
2335
    childparty_id int(11) NOT NULL,
2336 6429 aaronmk
    role varchar(255),
2337 5499 aaronmk
    memberstart date  NOT NULL,
2338
    memberstop date
2339 689 aaronmk
);
2340
2341
2342
--
2343
-- Name: partymember_partymember_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2344
--
2345
2346
2347
2348
2349
--
2350
-- Name: partymember_partymember_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2351
--
2352
2353
2354
2355
2356
--
2357 6029 aaronmk
-- Name: partymember_partymember_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2358
--
2359
2360
2361
2362
--
2363 5855 aaronmk
-- Name: place_place_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2364
--
2365
2366
2367
2368
2369
--
2370
-- Name: place_place_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2371
--
2372
2373
2374
2375
2376
--
2377 6029 aaronmk
-- Name: place_place_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2378
--
2379
2380
2381
2382
--
2383 5854 aaronmk
-- Name: placecorrelation; Type: TABLE; Schema: public; Owner: -; Tablespace:
2384 4730 aaronmk
--
2385
2386 5854 aaronmk
CREATE TABLE placecorrelation (
2387
    placecorrelation_id int(11) NOT NULL,
2388
    parentplace_id int(11) NOT NULL,
2389
    childplace_id int(11) NOT NULL,
2390 6429 aaronmk
    placeconvergence varchar(255) NOT NULL
2391 4739 aaronmk
);
2392 4730 aaronmk
2393
2394
--
2395 5854 aaronmk
-- Name: placecorrelation_placecorrelation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2396 4730 aaronmk
--
2397
2398
2399
2400
2401
--
2402 5854 aaronmk
-- Name: placecorrelation_placecorrelation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2403 4730 aaronmk
--
2404
2405
2406
2407 5854 aaronmk
2408 4730 aaronmk
--
2409 6029 aaronmk
-- Name: placecorrelation_placecorrelation_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2410
--
2411
2412
2413
2414
--
2415 5854 aaronmk
-- Name: placename; Type: TABLE; Schema: public; Owner: -; Tablespace:
2416 5440 aaronmk
--
2417
2418 5854 aaronmk
CREATE TABLE placename (
2419
    placename_id int(11) NOT NULL,
2420
    parent_id int(11),
2421 6429 aaronmk
    rank varchar(255) NOT NULL,
2422
    placename varchar(255) NOT NULL
2423 5854 aaronmk
);
2424 5440 aaronmk
2425
2426
--
2427 5854 aaronmk
-- Name: TABLE placename; Type: COMMENT; Schema: public; Owner: -
2428 4730 aaronmk
--
2429
2430
2431
2432
2433
--
2434 5854 aaronmk
-- Name: placename_ancestor; Type: TABLE; Schema: public; Owner: -; Tablespace:
2435 4730 aaronmk
--
2436
2437 5854 aaronmk
CREATE TABLE placename_ancestor (
2438
    placename_id int(11) NOT NULL,
2439
    ancestor_id int(11) NOT NULL
2440
);
2441 4730 aaronmk
2442
2443
--
2444 5854 aaronmk
-- Name: TABLE placename_ancestor; Type: COMMENT; Schema: public; Owner: -
2445 4727 aaronmk
--
2446
2447
2448
2449 5854 aaronmk
2450 4727 aaronmk
--
2451 5854 aaronmk
-- Name: placename_placename_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2452 4727 aaronmk
--
2453
2454
2455
2456
2457
--
2458 5854 aaronmk
-- Name: placename_placename_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2459 4739 aaronmk
--
2460
2461
2462
2463
2464
--
2465 6029 aaronmk
-- Name: placename_placename_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2466
--
2467
2468
2469
2470
--
2471 689 aaronmk
-- Name: plant; Type: TABLE; Schema: public; Owner: -; Tablespace:
2472
--
2473
2474
CREATE TABLE plant (
2475
    plant_id int(11) NOT NULL
2476
);
2477
2478
2479
--
2480
-- Name: TABLE plant; Type: COMMENT; Schema: public; Owner: -
2481
--
2482
2483
2484
2485
2486
--
2487
-- Name: plant_plant_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2488
--
2489
2490
2491
2492
2493
--
2494
-- Name: plant_plant_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2495
--
2496
2497
2498
2499
2500
--
2501 6029 aaronmk
-- Name: plant_plant_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2502
--
2503
2504
2505
2506
--
2507 689 aaronmk
-- Name: plantobservation_plantobservation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2508
--
2509
2510
2511
2512
2513
--
2514
-- Name: plantobservation_plantobservation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2515
--
2516
2517
2518
2519
2520
--
2521 6029 aaronmk
-- Name: plantobservation_plantobservation_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2522
--
2523
2524
2525
2526
--
2527 689 aaronmk
-- Name: project; Type: TABLE; Schema: public; Owner: -; Tablespace:
2528
--
2529
2530
CREATE TABLE project (
2531
    project_id int(11) NOT NULL,
2532 6179 aaronmk
    source_id int(11) NOT NULL,
2533 6429 aaronmk
    sourceaccessioncode varchar(255),
2534
    projectname varchar(255),
2535
    projectdescription varchar(255),
2536 5499 aaronmk
    startdate date,
2537
    stopdate date,
2538 6429 aaronmk
    accessioncode varchar(255)
2539 689 aaronmk
);
2540
2541
2542
--
2543
-- Name: project_project_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2544
--
2545
2546
2547
2548
2549
--
2550
-- Name: project_project_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2551
--
2552
2553
2554
2555
2556
--
2557 6029 aaronmk
-- Name: project_project_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2558
--
2559
2560
2561
2562
--
2563 689 aaronmk
-- Name: projectcontributor; Type: TABLE; Schema: public; Owner: -; Tablespace:
2564
--
2565
2566
CREATE TABLE projectcontributor (
2567
    projectcontributor_id int(11) NOT NULL,
2568
    project_id int(11) NOT NULL,
2569
    party_id int(11) NOT NULL,
2570 6429 aaronmk
    role varchar(255)
2571 689 aaronmk
);
2572
2573
2574
--
2575
-- Name: projectcontributor_projectcontributor_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2576
--
2577
2578
2579
2580
2581
--
2582
-- Name: projectcontributor_projectcontributor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2583
--
2584
2585
2586
2587
2588
--
2589 6029 aaronmk
-- Name: projectcontributor_projectcontributor_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2590
--
2591
2592
2593
2594
--
2595 6179 aaronmk
-- Name: revision; Type: TABLE; Schema: public; Owner: -; Tablespace:
2596 689 aaronmk
--
2597
2598 6179 aaronmk
CREATE TABLE revision (
2599
    revision_id int(11) NOT NULL,
2600 6429 aaronmk
    tablename varchar(255) NOT NULL,
2601
    tableattribute varchar(255) NOT NULL,
2602 6179 aaronmk
    tablerecord int(11) NOT NULL,
2603 6429 aaronmk
    previousvaluetext varchar(255) NOT NULL,
2604
    previousvaluetype varchar(255) NOT NULL,
2605 6179 aaronmk
    previousrevision_id int(11),
2606
    revisiondate date NOT NULL
2607
);
2608 689 aaronmk
2609
2610 6179 aaronmk
--
2611
-- Name: revision_revision_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2612
--
2613 689 aaronmk
2614 6179 aaronmk
2615
2616
2617 689 aaronmk
--
2618 6179 aaronmk
-- Name: revision_revision_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2619 689 aaronmk
--
2620
2621
2622
2623
2624
--
2625 6179 aaronmk
-- Name: revision_revision_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2626 6029 aaronmk
--
2627
2628
2629
2630
--
2631 6482 aaronmk
-- Name: soilsample; Type: TABLE; Schema: public; Owner: -; Tablespace:
2632 689 aaronmk
--
2633
2634 6482 aaronmk
CREATE TABLE soilsample (
2635
    soilsample_id int(11) NOT NULL,
2636 6179 aaronmk
    locationevent_id int(11) NOT NULL,
2637 6429 aaronmk
    horizon varchar(255) DEFAULT 'unknown' NOT NULL,
2638
    description varchar(255),
2639 6179 aaronmk
    depthtop_m double precision,
2640
    depthbottom_m double precision,
2641 6429 aaronmk
    color varchar(255),
2642
    texture varchar(255),
2643 6179 aaronmk
    organic_fraction double precision,
2644
    sand_fraction double precision,
2645
    silt_fraction double precision,
2646
    clay_fraction double precision,
2647
    coarse_fraction double precision,
2648
    ph double precision,
2649
    acidity_fraction double precision,
2650
    basesaturation_fraction double precision,
2651
    cationexchangecapacity_cmol_kg double precision,
2652
    conductivity double precision,
2653
    carbon_fraction double precision,
2654
    phosphorus_fraction double precision,
2655
    potassium_fraction double precision,
2656
    magnesium_fraction double precision,
2657
    nitrogen_fraction double precision,
2658
    calcium_fraction double precision,
2659
    sodium_fraction double precision
2660 689 aaronmk
);
2661
2662
2663
--
2664 6482 aaronmk
-- Name: soilsample_soilsample_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2665 689 aaronmk
--
2666
2667
2668
2669
2670
--
2671 6482 aaronmk
-- Name: soilsample_soilsample_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2672 689 aaronmk
--
2673
2674
2675
2676
2677
--
2678 6482 aaronmk
-- Name: soilsample_soilsample_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2679 6029 aaronmk
--
2680
2681
2682
2683
--
2684 6179 aaronmk
-- Name: soiltaxon; Type: TABLE; Schema: public; Owner: -; Tablespace:
2685 689 aaronmk
--
2686
2687 6179 aaronmk
CREATE TABLE soiltaxon (
2688
    soiltaxon_id int(11) NOT NULL,
2689 6429 aaronmk
    soilcode varchar(255),
2690
    soilname varchar(255),
2691 6179 aaronmk
    soillevel int(11),
2692
    soilparent_id int(11),
2693 6429 aaronmk
    soilframework varchar(255),
2694
    accessioncode varchar(255)
2695 689 aaronmk
);
2696
2697
2698
--
2699 6179 aaronmk
-- Name: soiltaxon_soiltaxon_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2700 689 aaronmk
--
2701
2702
2703
2704
2705
--
2706 6179 aaronmk
-- Name: soiltaxon_soiltaxon_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2707 689 aaronmk
--
2708
2709
2710
2711
2712
--
2713 6179 aaronmk
-- Name: soiltaxon_soiltaxon_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2714 6029 aaronmk
--
2715
2716
2717
2718
--
2719 6179 aaronmk
-- Name: source_source_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2720 689 aaronmk
--
2721
2722
2723
2724
2725
--
2726 6179 aaronmk
-- Name: source_source_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2727 689 aaronmk
--
2728
2729
2730
2731
2732
--
2733 6179 aaronmk
-- Name: source_source_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2734 6029 aaronmk
--
2735
2736
2737
2738
--
2739 6179 aaronmk
-- Name: sourcecontributor; Type: TABLE; Schema: public; Owner: -; Tablespace:
2740 689 aaronmk
--
2741
2742 6179 aaronmk
CREATE TABLE sourcecontributor (
2743
    sourcecontributor_id int(11) NOT NULL,
2744
    source_id int(11) NOT NULL,
2745
    sourceparty_id int(11) NOT NULL,
2746 6429 aaronmk
    role varchar(255),
2747 6282 aaronmk
    `order` int(11)
2748 689 aaronmk
);
2749
2750
2751
--
2752 6179 aaronmk
-- Name: sourcecontributor_sourcecontributor_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2753 689 aaronmk
--
2754
2755
2756
2757
2758
--
2759 6179 aaronmk
-- Name: sourcecontributor_sourcecontributor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2760 689 aaronmk
--
2761
2762
2763
2764
2765
--
2766 6179 aaronmk
-- Name: sourcecontributor_sourcecontributor_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2767 6029 aaronmk
--
2768
2769
2770
2771
--
2772 6179 aaronmk
-- Name: sourcename; Type: TABLE; Schema: public; Owner: -; Tablespace:
2773 689 aaronmk
--
2774
2775 6179 aaronmk
CREATE TABLE sourcename (
2776
    sourcename_id int(11) NOT NULL,
2777
    source_id int(11) NOT NULL,
2778 6429 aaronmk
    system varchar(255),
2779
    name varchar(255) NOT NULL,
2780 6179 aaronmk
    matched_source_id int(11)
2781 689 aaronmk
);
2782
2783
2784
--
2785 6179 aaronmk
-- Name: sourcename_sourcename_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2786 689 aaronmk
--
2787
2788
2789
2790
2791
--
2792 6179 aaronmk
-- Name: sourcename_sourcename_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2793 689 aaronmk
--
2794
2795
2796
2797
2798
--
2799 6179 aaronmk
-- Name: sourcename_sourcename_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2800 6029 aaronmk
--
2801
2802
2803
2804
--
2805 689 aaronmk
-- Name: specimen; Type: TABLE; Schema: public; Owner: -; Tablespace:
2806
--
2807
2808
CREATE TABLE specimen (
2809
    specimen_id int(11) NOT NULL
2810
);
2811
2812
2813
--
2814
-- Name: TABLE specimen; Type: COMMENT; Schema: public; Owner: -
2815
--
2816
2817
2818
2819
2820
--
2821
-- Name: specimen_specimen_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2822
--
2823
2824
2825
2826
2827
--
2828
-- Name: specimen_specimen_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2829
--
2830
2831
2832
2833
2834
--
2835 6029 aaronmk
-- Name: specimen_specimen_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2836
--
2837
2838
2839
2840
--
2841 6060 aaronmk
-- Name: specimenreplicate; Type: TABLE; Schema: public; Owner: -; Tablespace:
2842
--
2843
2844
CREATE TABLE specimenreplicate (
2845
    specimenreplicate_id int(11) NOT NULL,
2846 6179 aaronmk
    source_id int(11) NOT NULL,
2847 6429 aaronmk
    sourceaccessioncode varchar(255),
2848 6060 aaronmk
    plantobservation_id int(11),
2849
    institution_id int(11),
2850 6429 aaronmk
    collectioncode_dwc varchar(255),
2851
    catalognumber_dwc varchar(255),
2852
    description varchar(255),
2853 6060 aaronmk
    specimen_id int(11),
2854 6429 aaronmk
    accessioncode varchar(255)
2855 6060 aaronmk
);
2856
2857
2858
--
2859
-- Name: TABLE specimenreplicate; Type: COMMENT; Schema: public; Owner: -
2860
--
2861
2862
2863
2864
2865
--
2866
-- Name: COLUMN specimenreplicate.institution_id; Type: COMMENT; Schema: public; Owner: -
2867
--
2868
2869
2870
2871
2872
--
2873
-- Name: COLUMN specimenreplicate.collectioncode_dwc; Type: COMMENT; Schema: public; Owner: -
2874
--
2875
2876
2877
2878
2879
--
2880 3934 aaronmk
-- Name: specimenreplicate_specimenreplicate_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2881 689 aaronmk
--
2882
2883
2884
2885
2886
--
2887 3934 aaronmk
-- Name: specimenreplicate_specimenreplicate_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2888 3199 aaronmk
--
2889
2890
2891
2892
2893
--
2894 6029 aaronmk
-- Name: specimenreplicate_specimenreplicate_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2895
--
2896
2897
2898
2899
--
2900 689 aaronmk
-- Name: stemobservation_stemobservation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2901
--
2902
2903
2904
2905
2906
--
2907
-- Name: stemobservation_stemobservation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2908
--
2909
2910
2911
2912
2913
--
2914 6029 aaronmk
-- Name: stemobservation_stemobservation_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2915
--
2916
2917
2918
2919
--
2920 689 aaronmk
-- Name: stratum; Type: TABLE; Schema: public; Owner: -; Tablespace:
2921
--
2922
2923
CREATE TABLE stratum (
2924
    stratum_id int(11) NOT NULL,
2925
    locationevent_id int(11) NOT NULL,
2926
    stratumheight double precision,
2927
    stratumbase double precision,
2928
    stratumcover double precision,
2929 1029 aaronmk
    area double precision,
2930
    method_id int(11)
2931 689 aaronmk
);
2932
2933
2934
--
2935
-- Name: stratum_stratum_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2936
--
2937
2938
2939
2940
2941
--
2942
-- Name: stratum_stratum_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2943
--
2944
2945
2946
2947
2948
--
2949 6029 aaronmk
-- Name: stratum_stratum_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2950
--
2951
2952
2953
2954
--
2955 689 aaronmk
-- Name: taxonalt; Type: TABLE; Schema: public; Owner: -; Tablespace:
2956
--
2957
2958
CREATE TABLE taxonalt (
2959
    taxonalt_id int(11) NOT NULL,
2960
    taxondetermination_id int(11) NOT NULL,
2961 5608 aaronmk
    taxonlabel_id int(11) NOT NULL,
2962 6429 aaronmk
    taxonaltfit varchar(255),
2963
    taxonaltconfidence varchar(255),
2964
    taxonaltnotes varchar(255)
2965 689 aaronmk
);
2966
2967
2968
--
2969
-- Name: taxonalt_taxonalt_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2970
--
2971
2972
2973
2974
2975
--
2976
-- Name: taxonalt_taxonalt_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2977
--
2978
2979
2980
2981
2982
--
2983 6029 aaronmk
-- Name: taxonalt_taxonalt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2984
--
2985
2986
2987
2988
--
2989 5627 aaronmk
-- Name: taxonconcept; Type: TABLE; Schema: public; Owner: -; Tablespace:
2990
--
2991
2992
CREATE TABLE taxonconcept (
2993
    taxonlabel_id int(11) NOT NULL,
2994 6483 aaronmk
    concept_reference_id int(11)
2995 5627 aaronmk
);
2996
2997
2998
--
2999
-- Name: TABLE taxonconcept; Type: COMMENT; Schema: public; Owner: -
3000
--
3001
3002
3003
3004
3005
--
3006 6483 aaronmk
-- Name: COLUMN taxonconcept.concept_reference_id; Type: COMMENT; Schema: public; Owner: -
3007 5627 aaronmk
--
3008
3009
3010
3011
3012
--
3013
-- Name: taxonconcept_taxonlabel_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3014
--
3015
3016
3017
3018
3019
--
3020
-- Name: taxonconcept_taxonlabel_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3021
--
3022
3023
3024
3025
3026
--
3027 6029 aaronmk
-- Name: taxonconcept_taxonlabel_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3028
--
3029
3030
3031
3032
--
3033 5608 aaronmk
-- Name: taxoncorrelation; Type: TABLE; Schema: public; Owner: -; Tablespace:
3034 5274 aaronmk
--
3035
3036 5608 aaronmk
CREATE TABLE taxoncorrelation (
3037
    taxoncorrelation_id int(11) NOT NULL,
3038
    taxonstatus_id int(11) NOT NULL,
3039
    taxonlabel_id int(11) NOT NULL,
3040 6429 aaronmk
    plantconvergence varchar(255) NOT NULL,
3041 5608 aaronmk
    correlationstart date NOT NULL,
3042
    correlationstop date
3043 5274 aaronmk
);
3044
3045
3046
--
3047 5608 aaronmk
-- Name: taxoncorrelation_taxoncorrelation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3048 5440 aaronmk
--
3049
3050
3051
3052
3053
--
3054 5608 aaronmk
-- Name: taxoncorrelation_taxoncorrelation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3055 689 aaronmk
--
3056
3057
3058
3059
3060
--
3061 6029 aaronmk
-- Name: taxoncorrelation_taxoncorrelation_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3062
--
3063
3064
3065
3066
--
3067 5608 aaronmk
-- Name: taxondetermination_taxondetermination_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3068 689 aaronmk
--
3069
3070
3071
3072
3073
--
3074 5608 aaronmk
-- Name: taxondetermination_taxondetermination_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3075 5286 aaronmk
--
3076
3077
3078
3079 5608 aaronmk
3080 5286 aaronmk
--
3081 6029 aaronmk
-- Name: taxondetermination_taxondetermination_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3082
--
3083
3084
3085
3086
--
3087 5609 aaronmk
-- Name: taxonlabel_relationship; Type: TABLE; Schema: public; Owner: -; Tablespace:
3088 5286 aaronmk
--
3089
3090 5609 aaronmk
CREATE TABLE taxonlabel_relationship (
3091 5608 aaronmk
    descendant_id int(11) NOT NULL,
3092 5622 aaronmk
    ancestor_id int(11) NOT NULL,
3093 6429 aaronmk
    relationship varchar(255) DEFAULT 'is included in' NOT NULL
3094 5608 aaronmk
);
3095 5286 aaronmk
3096
3097
--
3098 5609 aaronmk
-- Name: TABLE taxonlabel_relationship; Type: COMMENT; Schema: public; Owner: -
3099 5286 aaronmk
--
3100
3101
3102
3103
3104
--
3105 5622 aaronmk
-- Name: COLUMN taxonlabel_relationship.relationship; Type: COMMENT; Schema: public; Owner: -
3106
--
3107
3108
3109
3110
3111
--
3112 5608 aaronmk
-- Name: taxonlabel_taxonlabel_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3113 3934 aaronmk
--
3114
3115
3116
3117
3118
--
3119 5608 aaronmk
-- Name: taxonlabel_taxonlabel_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3120 3934 aaronmk
--
3121
3122
3123
3124
3125
--
3126 6029 aaronmk
-- Name: taxonlabel_taxonlabel_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3127
--
3128
3129
3130
3131
--
3132 5286 aaronmk
-- Name: taxonlineage; Type: TABLE; Schema: public; Owner: -; Tablespace:
3133
--
3134
3135
CREATE TABLE taxonlineage (
3136
    taxonlineage_id int(11) NOT NULL,
3137
    childtaxonstatus_id int(11) NOT NULL,
3138
    parenttaxonstatus_id int(11) NOT NULL
3139
);
3140
3141
3142
--
3143
-- Name: taxonlineage_taxonlineage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3144
--
3145
3146
3147
3148
3149
--
3150
-- Name: taxonlineage_taxonlineage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3151
--
3152
3153
3154
3155
3156
--
3157 6029 aaronmk
-- Name: taxonlineage_taxonlineage_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3158
--
3159
3160
3161
3162
--
3163 5225 aaronmk
-- Name: taxonoccurrence_taxonoccurrence_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3164 4718 aaronmk
--
3165
3166
3167
3168
3169
--
3170 5225 aaronmk
-- Name: taxonoccurrence_taxonoccurrence_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3171 4718 aaronmk
--
3172
3173
3174
3175
3176
--
3177 6029 aaronmk
-- Name: taxonoccurrence_taxonoccurrence_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3178
--
3179
3180
3181
3182
--
3183 5286 aaronmk
-- Name: taxonstatus; Type: TABLE; Schema: public; Owner: -; Tablespace:
3184
--
3185
3186
CREATE TABLE taxonstatus (
3187
    taxonstatus_id int(11) NOT NULL,
3188 5608 aaronmk
    taxonlabel_id int(11) NOT NULL,
3189 5286 aaronmk
    party_id int(11),
3190 6429 aaronmk
    taxonlabelstatus varchar(255) DEFAULT 'undetermined' NOT NULL,
3191 6179 aaronmk
    source_id int(11),
3192 6429 aaronmk
    plantpartycomments varchar(255),
3193 5499 aaronmk
    startdate date,
3194
    stopdate date,
3195 6429 aaronmk
    accessioncode varchar(255)
3196 5286 aaronmk
);
3197
3198
3199
--
3200
-- Name: taxonstatus_taxonstatus_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3201
--
3202
3203
3204
3205
3206
--
3207
-- Name: taxonstatus_taxonstatus_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3208
--
3209
3210
3211
3212
3213
--
3214 6029 aaronmk
-- Name: taxonstatus_taxonstatus_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3215
--
3216
3217
3218
3219
--
3220 5660 aaronmk
-- Name: taxonverbatim_taxonverbatim_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3221
--
3222
3223
3224
3225
3226
--
3227
-- Name: taxonverbatim_taxonverbatim_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3228
--
3229
3230
3231
3232
3233
--
3234 6029 aaronmk
-- Name: taxonverbatim_taxonverbatim_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3235
--
3236
3237
3238
3239
--
3240 689 aaronmk
-- Name: telephone; Type: TABLE; Schema: public; Owner: -; Tablespace:
3241
--
3242
3243
CREATE TABLE telephone (
3244
    telephone_id int(11) NOT NULL,
3245
    party_id int(11) NOT NULL,
3246 6429 aaronmk
    phonenumber varchar(255) NOT NULL,
3247
    phonetype varchar(255) NOT NULL
3248 689 aaronmk
);
3249
3250
3251
--
3252
-- Name: telephone_telephone_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3253
--
3254
3255
3256
3257
3258
--
3259
-- Name: telephone_telephone_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3260
--
3261
3262
3263
3264
3265
--
3266 6029 aaronmk
-- Name: telephone_telephone_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3267
--
3268
3269
3270
3271
--
3272 6085 aaronmk
-- Name: threatened_taxonlabel_view; Type: VIEW; Schema: public; Owner: -
3273
--
3274
3275
3276
3277
3278
--
3279 5667 aaronmk
-- Name: tnrs_input_name; Type: VIEW; Schema: public; Owner: -
3280
--
3281
3282
3283
3284 5772 aaronmk
3285 5667 aaronmk
--
3286 689 aaronmk
-- Name: trait; Type: TABLE; Schema: public; Owner: -; Tablespace:
3287
--
3288
3289
CREATE TABLE trait (
3290
    trait_id int(11) NOT NULL,
3291
    stemobservation_id int(11) NOT NULL,
3292 6429 aaronmk
    type varchar(255) NOT NULL,
3293
    value varchar(255)
3294 689 aaronmk
);
3295
3296
3297
--
3298
-- Name: trait_trait_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3299
--
3300
3301
3302
3303
3304
--
3305
-- Name: trait_trait_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3306
--
3307
3308
3309
3310
3311
--
3312 6029 aaronmk
-- Name: trait_trait_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3313
--
3314
3315
3316
3317
--
3318 689 aaronmk
-- Name: userdefined; Type: TABLE; Schema: public; Owner: -; Tablespace:
3319
--
3320
3321
CREATE TABLE userdefined (
3322
    userdefined_id int(11) NOT NULL,
3323 6429 aaronmk
    userdefinedname varchar(255) NOT NULL,
3324
    userdefinedmetadata varchar(255),
3325
    userdefinedcategory varchar(255),
3326
    userdefinedtype varchar(255) DEFAULT 'varchar(255)' NOT NULL,
3327
    tablename varchar(255) NOT NULL,
3328
    accessioncode varchar(255)
3329 689 aaronmk
);
3330
3331
3332
--
3333
-- Name: userdefined_userdefined_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3334
--
3335
3336
3337
3338
3339
--
3340
-- Name: userdefined_userdefined_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3341
--
3342
3343
3344
3345
3346
--
3347 6029 aaronmk
-- Name: userdefined_userdefined_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3348
--
3349
3350
3351
3352
--
3353 689 aaronmk
-- Name: voucher; Type: TABLE; Schema: public; Owner: -; Tablespace:
3354
--
3355
3356
CREATE TABLE voucher (
3357
    voucher_id int(11) NOT NULL,
3358
    taxonoccurrence_id int(11) NOT NULL,
3359 5243 aaronmk
    specimenreplicate_id int(11) NOT NULL
3360 689 aaronmk
);
3361
3362
3363
--
3364
-- Name: voucher_voucher_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3365
--
3366
3367
3368
3369
3370
--
3371
-- Name: voucher_voucher_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3372
--
3373
3374
3375
3376
3377
--
3378 6029 aaronmk
-- Name: voucher_voucher_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3379
--
3380
3381
3382
3383
--
3384 689 aaronmk
-- Name: address_id; Type: DEFAULT; Schema: public; Owner: -
3385
--
3386
3387
3388
3389
3390
--
3391
-- Name: aggregateoccurrence_id; Type: DEFAULT; Schema: public; Owner: -
3392
--
3393
3394
3395
3396
3397
--
3398
-- Name: classcontributor_id; Type: DEFAULT; Schema: public; Owner: -
3399
--
3400
3401
3402
3403
3404
--
3405
-- Name: commclass_id; Type: DEFAULT; Schema: public; Owner: -
3406
--
3407
3408
3409
3410
3411
--
3412
-- Name: commconcept_id; Type: DEFAULT; Schema: public; Owner: -
3413
--
3414
3415
3416
3417
3418
--
3419
-- Name: commcorrelation_id; Type: DEFAULT; Schema: public; Owner: -
3420
--
3421
3422
3423
3424
3425
--
3426
-- Name: commdetermination_id; Type: DEFAULT; Schema: public; Owner: -
3427
--
3428
3429
3430
3431
3432
--
3433
-- Name: commlineage_id; Type: DEFAULT; Schema: public; Owner: -
3434
--
3435
3436
3437
3438
3439
--
3440
-- Name: commname_id; Type: DEFAULT; Schema: public; Owner: -
3441
--
3442
3443
3444
3445
3446
--
3447
-- Name: commstatus_id; Type: DEFAULT; Schema: public; Owner: -
3448
--
3449
3450
3451
3452
3453
--
3454
-- Name: commusage_id; Type: DEFAULT; Schema: public; Owner: -
3455
--
3456
3457
3458
3459
3460
--
3461 5859 aaronmk
-- Name: coordinates_id; Type: DEFAULT; Schema: public; Owner: -
3462
--
3463
3464
3465
3466
3467
--
3468 689 aaronmk
-- Name: coverindex_id; Type: DEFAULT; Schema: public; Owner: -
3469
--
3470
3471
3472
3473
3474
--
3475
-- Name: covermethod_id; Type: DEFAULT; Schema: public; Owner: -
3476
--
3477
3478
3479
3480
3481
--
3482
-- Name: definedvalue_id; Type: DEFAULT; Schema: public; Owner: -
3483
--
3484
3485
3486
3487
3488
--
3489
-- Name: disturbanceobs_id; Type: DEFAULT; Schema: public; Owner: -
3490
--
3491
3492
3493
3494
3495
--
3496
-- Name: graphic_id; Type: DEFAULT; Schema: public; Owner: -
3497
--
3498
3499
3500
3501
3502
--
3503
-- Name: location_id; Type: DEFAULT; Schema: public; Owner: -
3504
--
3505
3506
3507
3508
3509
--
3510 906 aaronmk
-- Name: locationevent_id; Type: DEFAULT; Schema: public; Owner: -
3511 689 aaronmk
--
3512
3513
3514
3515
3516
--
3517 906 aaronmk
-- Name: locationeventcontributor_id; Type: DEFAULT; Schema: public; Owner: -
3518 689 aaronmk
--
3519
3520
3521
3522
3523
--
3524 906 aaronmk
-- Name: locationeventsynonym_id; Type: DEFAULT; Schema: public; Owner: -
3525 689 aaronmk
--
3526
3527
3528
3529
3530
--
3531 4726 aaronmk
-- Name: locationplace_id; Type: DEFAULT; Schema: public; Owner: -
3532
--
3533
3534
3535
3536
3537
--
3538 907 aaronmk
-- Name: method_id; Type: DEFAULT; Schema: public; Owner: -
3539
--
3540
3541
3542
3543
3544
--
3545 1101 aaronmk
-- Name: methodtaxonclass_id; Type: DEFAULT; Schema: public; Owner: -
3546
--
3547
3548
3549
3550
3551
--
3552 4730 aaronmk
-- Name: note_id; Type: DEFAULT; Schema: public; Owner: -
3553 689 aaronmk
--
3554
3555
3556
3557
3558
--
3559 4730 aaronmk
-- Name: notelink_id; Type: DEFAULT; Schema: public; Owner: -
3560 689 aaronmk
--
3561
3562
3563
3564
3565
--
3566 4730 aaronmk
-- Name: party_id; Type: DEFAULT; Schema: public; Owner: -
3567 689 aaronmk
--
3568
3569
3570
3571
3572
--
3573 4730 aaronmk
-- Name: partymember_id; Type: DEFAULT; Schema: public; Owner: -
3574 689 aaronmk
--
3575
3576
3577
3578
3579
--
3580 5855 aaronmk
-- Name: place_id; Type: DEFAULT; Schema: public; Owner: -
3581 689 aaronmk
--
3582
3583
3584
3585
3586
--
3587 5855 aaronmk
-- Name: placecorrelation_id; Type: DEFAULT; Schema: public; Owner: -
3588 689 aaronmk
--
3589
3590
3591
3592
3593
--
3594 5855 aaronmk
-- Name: placename_id; Type: DEFAULT; Schema: public; Owner: -
3595 4727 aaronmk
--
3596
3597
3598
3599
3600
--
3601 689 aaronmk
-- Name: plant_id; Type: DEFAULT; Schema: public; Owner: -
3602
--
3603
3604
3605
3606
3607
--
3608 5286 aaronmk
-- Name: plantobservation_id; Type: DEFAULT; Schema: public; Owner: -
3609 903 aaronmk
--
3610
3611
3612
3613
3614
--
3615 5286 aaronmk
-- Name: project_id; Type: DEFAULT; Schema: public; Owner: -
3616 689 aaronmk
--
3617
3618
3619
3620
3621
--
3622 5286 aaronmk
-- Name: projectcontributor_id; Type: DEFAULT; Schema: public; Owner: -
3623 689 aaronmk
--
3624
3625
3626
3627
3628
--
3629 6179 aaronmk
-- Name: revision_id; Type: DEFAULT; Schema: public; Owner: -
3630 689 aaronmk
--
3631
3632
3633
3634
3635
--
3636 6482 aaronmk
-- Name: soilsample_id; Type: DEFAULT; Schema: public; Owner: -
3637 689 aaronmk
--
3638
3639
3640
3641
3642
--
3643 6179 aaronmk
-- Name: soiltaxon_id; Type: DEFAULT; Schema: public; Owner: -
3644 689 aaronmk
--
3645
3646
3647
3648
3649
--
3650 6179 aaronmk
-- Name: source_id; Type: DEFAULT; Schema: public; Owner: -
3651 689 aaronmk
--
3652
3653
3654
3655
3656
--
3657 6179 aaronmk
-- Name: sourcecontributor_id; Type: DEFAULT; Schema: public; Owner: -
3658 689 aaronmk
--
3659
3660
3661
3662
3663
--
3664 6179 aaronmk
-- Name: sourcename_id; Type: DEFAULT; Schema: public; Owner: -
3665 689 aaronmk
--
3666
3667
3668
3669
3670
--
3671 5286 aaronmk
-- Name: specimen_id; Type: DEFAULT; Schema: public; Owner: -
3672 689 aaronmk
--
3673
3674
3675
3676
3677
--
3678 5286 aaronmk
-- Name: specimenreplicate_id; Type: DEFAULT; Schema: public; Owner: -
3679 689 aaronmk
--
3680
3681
3682
3683
3684
--
3685 5286 aaronmk
-- Name: stemobservation_id; Type: DEFAULT; Schema: public; Owner: -
3686 689 aaronmk
--
3687
3688
3689
3690
3691
--
3692 5286 aaronmk
-- Name: stratum_id; Type: DEFAULT; Schema: public; Owner: -
3693 689 aaronmk
--
3694
3695
3696
3697
3698
--
3699 5286 aaronmk
-- Name: taxonalt_id; Type: DEFAULT; Schema: public; Owner: -
3700 689 aaronmk
--
3701
3702
3703
3704
3705
--
3706 5608 aaronmk
-- Name: taxoncorrelation_id; Type: DEFAULT; Schema: public; Owner: -
3707 3934 aaronmk
--
3708
3709
3710
3711
3712
--
3713 5608 aaronmk
-- Name: taxondetermination_id; Type: DEFAULT; Schema: public; Owner: -
3714 689 aaronmk
--
3715
3716
3717
3718
3719
--
3720 5608 aaronmk
-- Name: taxonlabel_id; Type: DEFAULT; Schema: public; Owner: -
3721 689 aaronmk
--
3722
3723
3724
3725
3726
--
3727 5286 aaronmk
-- Name: taxonlineage_id; Type: DEFAULT; Schema: public; Owner: -
3728 689 aaronmk
--
3729
3730
3731
3732
3733
--
3734 5286 aaronmk
-- Name: taxonoccurrence_id; Type: DEFAULT; Schema: public; Owner: -
3735 689 aaronmk
--
3736
3737
3738
3739
3740
--
3741 5286 aaronmk
-- Name: taxonstatus_id; Type: DEFAULT; Schema: public; Owner: -
3742 689 aaronmk
--
3743
3744
3745
3746
3747
--
3748 5660 aaronmk
-- Name: taxonverbatim_id; Type: DEFAULT; Schema: public; Owner: -
3749
--
3750
3751
3752
3753
3754
--
3755 689 aaronmk
-- Name: telephone_id; Type: DEFAULT; Schema: public; Owner: -
3756
--
3757
3758
3759
3760
3761
--
3762
-- Name: trait_id; Type: DEFAULT; Schema: public; Owner: -
3763
--
3764
3765
3766
3767
3768
--
3769
-- Name: userdefined_id; Type: DEFAULT; Schema: public; Owner: -
3770
--
3771
3772
3773
3774
3775
--
3776
-- Name: voucher_id; Type: DEFAULT; Schema: public; Owner: -
3777
--
3778
3779
3780
3781
3782
--
3783 6029 aaronmk
-- Data for Name: address; Type: TABLE DATA; Schema: public; Owner: -
3784
--
3785
3786
3787
3788
--
3789
-- Data for Name: aggregateoccurrence; Type: TABLE DATA; Schema: public; Owner: -
3790
--
3791
3792
3793
3794
--
3795
-- Data for Name: analytical_aggregate; Type: TABLE DATA; Schema: public; Owner: -
3796
--
3797
3798
3799
3800
--
3801
-- Data for Name: analytical_stem; Type: TABLE DATA; Schema: public; Owner: -
3802
--
3803
3804
3805
3806
--
3807
-- Data for Name: classcontributor; Type: TABLE DATA; Schema: public; Owner: -
3808
--
3809
3810
3811
3812
--
3813
-- Data for Name: commclass; Type: TABLE DATA; Schema: public; Owner: -
3814
--
3815
3816
3817
3818
--
3819
-- Data for Name: commconcept; Type: TABLE DATA; Schema: public; Owner: -
3820
--
3821
3822
3823
3824
--
3825
-- Data for Name: commcorrelation; Type: TABLE DATA; Schema: public; Owner: -
3826
--
3827
3828
3829
3830
--
3831
-- Data for Name: commdetermination; Type: TABLE DATA; Schema: public; Owner: -
3832
--
3833
3834
3835
3836
--
3837
-- Data for Name: commlineage; Type: TABLE DATA; Schema: public; Owner: -
3838
--
3839
3840
3841
3842
--
3843
-- Data for Name: commname; Type: TABLE DATA; Schema: public; Owner: -
3844
--
3845
3846
3847
3848
--
3849
-- Data for Name: commstatus; Type: TABLE DATA; Schema: public; Owner: -
3850
--
3851
3852
3853
3854
--
3855
-- Data for Name: commusage; Type: TABLE DATA; Schema: public; Owner: -
3856
--
3857
3858
3859
3860
--
3861
-- Data for Name: coordinates; Type: TABLE DATA; Schema: public; Owner: -
3862
--
3863
3864
3865
3866
--
3867
-- Data for Name: coverindex; Type: TABLE DATA; Schema: public; Owner: -
3868
--
3869
3870
3871
3872
--
3873
-- Data for Name: covermethod; Type: TABLE DATA; Schema: public; Owner: -
3874
--
3875
3876
3877
3878
--
3879 6433 aaronmk
-- Data for Name: cultivated_family_locations; Type: TABLE DATA; Schema: public; Owner: -
3880
--
3881
3882 6434 aaronmk
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Costa Rica');
3883
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Panama');
3884
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Colombia');
3885
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Venezuela');
3886
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Ecuador');
3887
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Peru');
3888
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Bolivia');
3889
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Chile');
3890
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Argentina');
3891
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Paraguay');
3892
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Uruguay');
3893
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Brazil');
3894
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Guyana');
3895
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'French Guiana');
3896
INSERT INTO cultivated_family_locations VALUES ('Pinus', 'Suriname');
3897
INSERT INTO cultivated_family_locations VALUES ('Quercus', 'Venezuela');
3898
INSERT INTO cultivated_family_locations VALUES ('Quercus', 'Ecuador');
3899
INSERT INTO cultivated_family_locations VALUES ('Quercus', 'Peru');
3900
INSERT INTO cultivated_family_locations VALUES ('Quercus', 'Bolivia');
3901
INSERT INTO cultivated_family_locations VALUES ('Quercus', 'Chile');
3902
INSERT INTO cultivated_family_locations VALUES ('Quercus', 'Argentina');
3903
INSERT INTO cultivated_family_locations VALUES ('Quercus', 'Paraguay');
3904
INSERT INTO cultivated_family_locations VALUES ('Quercus', 'Uruguay');
3905
INSERT INTO cultivated_family_locations VALUES ('Quercus', 'Brazil');
3906
INSERT INTO cultivated_family_locations VALUES ('Quercus', 'Guyana');
3907
INSERT INTO cultivated_family_locations VALUES ('Quercus', 'French Guiana');
3908
INSERT INTO cultivated_family_locations VALUES ('Quercus', 'Suriname');
3909
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Nicaragua');
3910
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Costa Rica');
3911
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Panama');
3912
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Colombia');
3913
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Venezuela');
3914
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Ecuador');
3915
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Peru');
3916
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Bolivia');
3917
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Chile');
3918
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Argentina');
3919
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Paraguay');
3920
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Uruguay');
3921
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Brazil');
3922
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Guyana');
3923
INSERT INTO cultivated_family_locations VALUES ('Acer', 'French Guiana');
3924
INSERT INTO cultivated_family_locations VALUES ('Acer', 'Suriname');
3925
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Nicaragua');
3926
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Costa Rica');
3927
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Panama');
3928
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Colombia');
3929
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Venezuela');
3930
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Ecuador');
3931
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Peru');
3932
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Bolivia');
3933
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Chile');
3934
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Argentina');
3935
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Paraguay');
3936
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Uruguay');
3937
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Brazil');
3938
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Guyana');
3939
INSERT INTO cultivated_family_locations VALUES ('Abies', 'French Guiana');
3940
INSERT INTO cultivated_family_locations VALUES ('Abies', 'Suriname');
3941
INSERT INTO cultivated_family_locations VALUES ('Arecaceae', 'Canada');
3942 6433 aaronmk
3943
3944
--
3945 6029 aaronmk
-- Data for Name: definedvalue; Type: TABLE DATA; Schema: public; Owner: -
3946
--
3947
3948
3949
3950
--
3951
-- Data for Name: disturbanceobs; Type: TABLE DATA; Schema: public; Owner: -
3952
--
3953
3954
3955
3956
--
3957 6036 aaronmk
-- Data for Name: family_higher_plant_group; Type: TABLE DATA; Schema: public; Owner: -
3958
--
3959
3960
3961
3962
--
3963 6029 aaronmk
-- Data for Name: geoscrub_input; Type: TABLE DATA; Schema: public; Owner: -
3964
--
3965
3966
3967
3968
--
3969
-- Data for Name: graphic; Type: TABLE DATA; Schema: public; Owner: -
3970
--
3971
3972
3973
3974
--
3975 6030 aaronmk
-- Data for Name: higher_plant_group_nodes; Type: TABLE DATA; Schema: public; Owner: -
3976
--
3977
3978 6038 aaronmk
INSERT INTO higher_plant_group_nodes VALUES ('bryophytes', 'Anthocerotophyta');
3979
INSERT INTO higher_plant_group_nodes VALUES ('bryophytes', 'Marchantiophyta');
3980
INSERT INTO higher_plant_group_nodes VALUES ('bryophytes', 'Bryophyta');
3981
INSERT INTO higher_plant_group_nodes VALUES ('ferns and allies', 'Anthocerotophyta');
3982
INSERT INTO higher_plant_group_nodes VALUES ('ferns and allies', 'Marchantiophyta');
3983
INSERT INTO higher_plant_group_nodes VALUES ('ferns and allies', 'Bryophyta');
3984
INSERT INTO higher_plant_group_nodes VALUES ('ferns and allies', 'Moniliformopses');
3985
INSERT INTO higher_plant_group_nodes VALUES ('flowering plants', 'Magnoliophyta');
3986
INSERT INTO higher_plant_group_nodes VALUES ('gymnosperms (conifers)', 'Coniferophyta');
3987
INSERT INTO higher_plant_group_nodes VALUES ('gymnosperms (non-conifer)', 'Cycadophyta');
3988
INSERT INTO higher_plant_group_nodes VALUES ('gymnosperms (non-conifer)', 'Ginkgophyta');
3989
INSERT INTO higher_plant_group_nodes VALUES ('gymnosperms (non-conifer)', 'Gnetophyta');
3990 6247 aaronmk
INSERT INTO higher_plant_group_nodes VALUES (NULL, 'root');
3991 6030 aaronmk
3992
3993
--
3994 6029 aaronmk
-- Data for Name: location; Type: TABLE DATA; Schema: public; Owner: -
3995
--
3996
3997
3998
3999
--
4000
-- Data for Name: locationevent; Type: TABLE DATA; Schema: public; Owner: -
4001
--
4002
4003
4004
4005
--
4006
-- Data for Name: locationeventcontributor; Type: TABLE DATA; Schema: public; Owner: -
4007
--
4008
4009
4010
4011
--
4012
-- Data for Name: locationeventsynonym; Type: TABLE DATA; Schema: public; Owner: -
4013
--
4014
4015
4016
4017
--
4018
-- Data for Name: locationplace; Type: TABLE DATA; Schema: public; Owner: -
4019
--
4020
4021
4022
4023
--
4024
-- Data for Name: method; Type: TABLE DATA; Schema: public; Owner: -
4025
--
4026
4027
4028
4029
--
4030
-- Data for Name: methodtaxonclass; Type: TABLE DATA; Schema: public; Owner: -
4031
--
4032
4033
4034
4035
--
4036
-- Data for Name: note; Type: TABLE DATA; Schema: public; Owner: -
4037
--
4038
4039
4040
4041
--
4042
-- Data for Name: notelink; Type: TABLE DATA; Schema: public; Owner: -
4043
--
4044
4045
4046
4047
--
4048
-- Data for Name: party; Type: TABLE DATA; Schema: public; Owner: -
4049
--
4050
4051
4052
4053
--
4054
-- Data for Name: partymember; Type: TABLE DATA; Schema: public; Owner: -
4055
--
4056
4057
4058
4059
--
4060
-- Data for Name: place; Type: TABLE DATA; Schema: public; Owner: -
4061
--
4062
4063
4064
4065
--
4066
-- Data for Name: placecorrelation; Type: TABLE DATA; Schema: public; Owner: -
4067
--
4068
4069
4070
4071
--
4072
-- Data for Name: placename; Type: TABLE DATA; Schema: public; Owner: -
4073
--
4074
4075
4076
4077
--
4078
-- Data for Name: placename_ancestor; Type: TABLE DATA; Schema: public; Owner: -
4079
--
4080
4081
4082
4083
--
4084
-- Data for Name: plant; Type: TABLE DATA; Schema: public; Owner: -
4085
--
4086
4087
4088
4089
--
4090
-- Data for Name: plantobservation; Type: TABLE DATA; Schema: public; Owner: -
4091
--
4092
4093
4094
4095
--
4096
-- Data for Name: project; Type: TABLE DATA; Schema: public; Owner: -
4097
--
4098
4099
4100
4101
--
4102
-- Data for Name: projectcontributor; Type: TABLE DATA; Schema: public; Owner: -
4103
--
4104
4105
4106
4107
--
4108 6179 aaronmk
-- Data for Name: revision; Type: TABLE DATA; Schema: public; Owner: -
4109 6029 aaronmk
--
4110
4111
4112
4113
--
4114 6482 aaronmk
-- Data for Name: soilsample; Type: TABLE DATA; Schema: public; Owner: -
4115 6029 aaronmk
--
4116
4117
4118
4119
--
4120 6179 aaronmk
-- Data for Name: soiltaxon; Type: TABLE DATA; Schema: public; Owner: -
4121 6029 aaronmk
--
4122
4123
4124
4125
--
4126 6179 aaronmk
-- Data for Name: source; Type: TABLE DATA; Schema: public; Owner: -
4127 6029 aaronmk
--
4128
4129
4130
4131
--
4132 6179 aaronmk
-- Data for Name: sourcecontributor; Type: TABLE DATA; Schema: public; Owner: -
4133 6029 aaronmk
--
4134
4135
4136
4137
--
4138 6179 aaronmk
-- Data for Name: sourcename; Type: TABLE DATA; Schema: public; Owner: -
4139 6029 aaronmk
--
4140
4141
4142
4143
--
4144
-- Data for Name: specimen; Type: TABLE DATA; Schema: public; Owner: -
4145
--
4146
4147
4148
4149
--
4150
-- Data for Name: specimenreplicate; Type: TABLE DATA; Schema: public; Owner: -
4151
--
4152
4153
4154
4155
--
4156
-- Data for Name: stemobservation; Type: TABLE DATA; Schema: public; Owner: -
4157
--
4158
4159
4160
4161
--
4162
-- Data for Name: stratum; Type: TABLE DATA; Schema: public; Owner: -
4163
--
4164
4165
4166
4167
--
4168
-- Data for Name: taxonalt; Type: TABLE DATA; Schema: public; Owner: -
4169
--
4170
4171
4172
4173
--
4174
-- Data for Name: taxonconcept; Type: TABLE DATA; Schema: public; Owner: -
4175
--
4176
4177
4178
4179
--
4180
-- Data for Name: taxoncorrelation; Type: TABLE DATA; Schema: public; Owner: -
4181
--
4182
4183
4184
4185
--
4186
-- Data for Name: taxondetermination; Type: TABLE DATA; Schema: public; Owner: -
4187
--
4188
4189
4190
4191
--
4192
-- Data for Name: taxonlabel; Type: TABLE DATA; Schema: public; Owner: -
4193
--
4194
4195
4196
4197
--
4198
-- Data for Name: taxonlabel_relationship; Type: TABLE DATA; Schema: public; Owner: -
4199
--
4200
4201
4202
4203
--
4204
-- Data for Name: taxonlineage; Type: TABLE DATA; Schema: public; Owner: -
4205
--
4206
4207
4208
4209
--
4210
-- Data for Name: taxonoccurrence; Type: TABLE DATA; Schema: public; Owner: -
4211
--
4212
4213
4214
4215
--
4216
-- Data for Name: taxonstatus; Type: TABLE DATA; Schema: public; Owner: -
4217
--
4218
4219
4220
4221
--
4222
-- Data for Name: taxonverbatim; Type: TABLE DATA; Schema: public; Owner: -
4223
--
4224
4225
4226
4227
--
4228
-- Data for Name: telephone; Type: TABLE DATA; Schema: public; Owner: -
4229
--
4230
4231
4232
4233
--
4234 6085 aaronmk
-- Data for Name: threatened_taxonlabel; Type: TABLE DATA; Schema: public; Owner: -
4235
--
4236
4237
4238
4239
--
4240 6029 aaronmk
-- Data for Name: trait; Type: TABLE DATA; Schema: public; Owner: -
4241
--
4242
4243
4244
4245
--
4246
-- Data for Name: userdefined; Type: TABLE DATA; Schema: public; Owner: -
4247
--
4248
4249
4250
4251
--
4252
-- Data for Name: voucher; Type: TABLE DATA; Schema: public; Owner: -
4253
--
4254
4255
4256
4257
--
4258 689 aaronmk
-- Name: address_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4259
--
4260
4261
ALTER TABLE address
4262
    ADD CONSTRAINT address_pkey PRIMARY KEY (address_id);
4263
4264
4265
--
4266 1113 aaronmk
-- Name: aggregateoccurrence_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4267 689 aaronmk
--
4268
4269
ALTER TABLE aggregateoccurrence
4270 1113 aaronmk
    ADD CONSTRAINT aggregateoccurrence_pkey PRIMARY KEY (aggregateoccurrence_id);
4271 689 aaronmk
4272
4273
--
4274
-- Name: classcontributor_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4275
--
4276
4277
ALTER TABLE classcontributor
4278
    ADD CONSTRAINT classcontributor_pkey PRIMARY KEY (classcontributor_id);
4279
4280
4281
--
4282 1113 aaronmk
-- Name: commclass_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4283 689 aaronmk
--
4284
4285
ALTER TABLE commclass
4286 1113 aaronmk
    ADD CONSTRAINT commclass_pkey PRIMARY KEY (commclass_id);
4287 689 aaronmk
4288
4289
--
4290 1113 aaronmk
-- Name: commconcept_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4291 689 aaronmk
--
4292
4293
ALTER TABLE commconcept
4294 1113 aaronmk
    ADD CONSTRAINT commconcept_pkey PRIMARY KEY (commconcept_id);
4295 689 aaronmk
4296
4297
--
4298 1113 aaronmk
-- Name: commconcept_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4299 689 aaronmk
--
4300
4301
ALTER TABLE commconcept
4302 1113 aaronmk
    ADD CONSTRAINT commconcept_unique UNIQUE (commname_id);
4303 689 aaronmk
4304
4305
--
4306
-- Name: commcorrelation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4307
--
4308
4309
ALTER TABLE commcorrelation
4310
    ADD CONSTRAINT commcorrelation_pkey PRIMARY KEY (commcorrelation_id);
4311
4312
4313
--
4314 1113 aaronmk
-- Name: commdetermination_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4315 689 aaronmk
--
4316
4317
ALTER TABLE commdetermination
4318 1113 aaronmk
    ADD CONSTRAINT commdetermination_pkey PRIMARY KEY (commdetermination_id);
4319 689 aaronmk
4320
4321
--
4322 1113 aaronmk
-- Name: commdetermination_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4323 689 aaronmk
--
4324
4325
ALTER TABLE commdetermination
4326 1113 aaronmk
    ADD CONSTRAINT commdetermination_unique UNIQUE (commclass_id, commconcept_id);
4327 689 aaronmk
4328
4329
--
4330
-- Name: commlineage_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4331
--
4332
4333
ALTER TABLE commlineage
4334
    ADD CONSTRAINT commlineage_pkey PRIMARY KEY (commlineage_id);
4335
4336
4337
--
4338 1113 aaronmk
-- Name: commname_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4339 689 aaronmk
--
4340
4341
ALTER TABLE commname
4342 1113 aaronmk
    ADD CONSTRAINT commname_pkey PRIMARY KEY (commname_id);
4343 689 aaronmk
4344
4345
--
4346 1113 aaronmk
-- Name: commname_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4347 689 aaronmk
--
4348
4349
ALTER TABLE commname
4350 1113 aaronmk
    ADD CONSTRAINT commname_unique UNIQUE (commname);
4351 689 aaronmk
4352
4353
--
4354
-- Name: commstatus_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4355
--
4356
4357
ALTER TABLE commstatus
4358
    ADD CONSTRAINT commstatus_pkey PRIMARY KEY (commstatus_id);
4359
4360
4361
--
4362
-- Name: commusage_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4363
--
4364
4365
ALTER TABLE commusage
4366
    ADD CONSTRAINT commusage_pkey PRIMARY KEY (commusage_id);
4367
4368
4369
--
4370 5859 aaronmk
-- Name: coordinates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4371
--
4372
4373
ALTER TABLE coordinates
4374
    ADD CONSTRAINT coordinates_pkey PRIMARY KEY (coordinates_id);
4375
4376
4377
--
4378 689 aaronmk
-- Name: coverindex_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4379
--
4380
4381
ALTER TABLE coverindex
4382
    ADD CONSTRAINT coverindex_pkey PRIMARY KEY (coverindex_id);
4383
4384
4385
--
4386
-- Name: covermethod_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4387
--
4388
4389
ALTER TABLE covermethod
4390
    ADD CONSTRAINT covermethod_pkey PRIMARY KEY (covermethod_id);
4391
4392
4393
--
4394 6433 aaronmk
-- Name: cultivated_family_locations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4395
--
4396
4397
ALTER TABLE cultivated_family_locations
4398
    ADD CONSTRAINT cultivated_family_locations_pkey PRIMARY KEY (family, country);
4399
4400
4401
--
4402 689 aaronmk
-- Name: definedvalue_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4403
--
4404
4405
ALTER TABLE definedvalue
4406
    ADD CONSTRAINT definedvalue_pkey PRIMARY KEY (definedvalue_id);
4407
4408
4409
--
4410 1221 aaronmk
-- Name: definedvalue_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4411
--
4412
4413
ALTER TABLE definedvalue
4414
    ADD CONSTRAINT definedvalue_unique UNIQUE (userdefined_id, tablerecord_id);
4415
4416
4417
--
4418 689 aaronmk
-- Name: disturbanceobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4419
--
4420
4421
ALTER TABLE disturbanceobs
4422
    ADD CONSTRAINT disturbanceobs_pkey PRIMARY KEY (disturbanceobs_id);
4423
4424
4425
--
4426 6036 aaronmk
-- Name: family_higher_plant_group_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4427
--
4428
4429
ALTER TABLE family_higher_plant_group
4430
    ADD CONSTRAINT family_higher_plant_group_pkey PRIMARY KEY (family);
4431
4432
4433
--
4434 689 aaronmk
-- Name: graphic_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4435
--
4436
4437
ALTER TABLE graphic
4438
    ADD CONSTRAINT graphic_pkey PRIMARY KEY (graphic_id);
4439
4440
4441
--
4442 1113 aaronmk
-- Name: location_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4443 689 aaronmk
--
4444
4445
ALTER TABLE location
4446 1113 aaronmk
    ADD CONSTRAINT location_pkey PRIMARY KEY (location_id);
4447 689 aaronmk
4448
4449
--
4450 1113 aaronmk
-- Name: locationevent_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4451 1074 aaronmk
--
4452
4453
ALTER TABLE locationevent
4454 1113 aaronmk
    ADD CONSTRAINT locationevent_pkey PRIMARY KEY (locationevent_id);
4455 1074 aaronmk
4456
4457
--
4458 689 aaronmk
-- Name: locationeventcontributor_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4459
--
4460
4461
ALTER TABLE locationeventcontributor
4462
    ADD CONSTRAINT locationeventcontributor_pkey PRIMARY KEY (locationeventcontributor_id);
4463
4464
4465
--
4466
-- Name: locationeventsynonym_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4467
--
4468
4469
ALTER TABLE locationeventsynonym
4470
    ADD CONSTRAINT locationeventsynonym_pkey PRIMARY KEY (locationeventsynonym_id);
4471
4472
4473
--
4474 4726 aaronmk
-- Name: locationplace_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4475
--
4476
4477
ALTER TABLE locationplace
4478
    ADD CONSTRAINT locationplace_pkey PRIMARY KEY (locationplace_id);
4479
4480
4481
--
4482 907 aaronmk
-- Name: method_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4483
--
4484
4485
ALTER TABLE method
4486
    ADD CONSTRAINT method_pkey PRIMARY KEY (method_id);
4487
4488
4489
--
4490 1101 aaronmk
-- Name: methodtaxonclass_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4491
--
4492
4493
ALTER TABLE methodtaxonclass
4494
    ADD CONSTRAINT methodtaxonclass_pkey PRIMARY KEY (methodtaxonclass_id);
4495
4496
4497
--
4498 1160 aaronmk
-- Name: methodtaxonclass_unique_description; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4499
--
4500
4501
ALTER TABLE methodtaxonclass
4502 1174 aaronmk
    ADD CONSTRAINT methodtaxonclass_unique_description UNIQUE (method_id, taxonclass);
4503 1160 aaronmk
4504
4505
--
4506 5608 aaronmk
-- Name: methodtaxonclass_unique_taxonlabel_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4507 1160 aaronmk
--
4508
4509
ALTER TABLE methodtaxonclass
4510 5608 aaronmk
    ADD CONSTRAINT methodtaxonclass_unique_taxonlabel_id UNIQUE (method_id, taxonlabel_id);
4511 1160 aaronmk
4512
4513
--
4514 4730 aaronmk
-- Name: note_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4515 1555 aaronmk
--
4516
4517 4730 aaronmk
ALTER TABLE note
4518
    ADD CONSTRAINT note_pkey PRIMARY KEY (note_id);
4519 1555 aaronmk
4520
4521
--
4522 4730 aaronmk
-- Name: notelink_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4523 689 aaronmk
--
4524
4525 4730 aaronmk
ALTER TABLE notelink
4526
    ADD CONSTRAINT notelink_pkey PRIMARY KEY (notelink_id);
4527 689 aaronmk
4528
4529
--
4530 4730 aaronmk
-- Name: party_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4531 689 aaronmk
--
4532
4533 4730 aaronmk
ALTER TABLE party
4534
    ADD CONSTRAINT party_pkey PRIMARY KEY (party_id);
4535 689 aaronmk
4536
4537
--
4538 4730 aaronmk
-- Name: partymember_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4539 689 aaronmk
--
4540
4541 4730 aaronmk
ALTER TABLE partymember
4542
    ADD CONSTRAINT partymember_pkey PRIMARY KEY (partymember_id);
4543 689 aaronmk
4544
4545
--
4546 5855 aaronmk
-- Name: place_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4547
--
4548
4549
ALTER TABLE place
4550
    ADD CONSTRAINT place_pkey PRIMARY KEY (place_id);
4551
4552
4553
--
4554 5854 aaronmk
-- Name: placecorrelation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4555 689 aaronmk
--
4556
4557 5854 aaronmk
ALTER TABLE placecorrelation
4558
    ADD CONSTRAINT placecorrelation_pkey PRIMARY KEY (placecorrelation_id);
4559 689 aaronmk
4560
4561
--
4562 5854 aaronmk
-- Name: placename_ancestor_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4563 689 aaronmk
--
4564
4565 5854 aaronmk
ALTER TABLE placename_ancestor
4566
    ADD CONSTRAINT placename_ancestor_pkey PRIMARY KEY (placename_id, ancestor_id);
4567 689 aaronmk
4568
4569
--
4570 5854 aaronmk
-- Name: placename_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4571 689 aaronmk
--
4572
4573 5854 aaronmk
ALTER TABLE placename
4574
    ADD CONSTRAINT placename_pkey PRIMARY KEY (placename_id);
4575 689 aaronmk
4576
4577
--
4578
-- Name: plant_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4579
--
4580
4581
ALTER TABLE plant
4582
    ADD CONSTRAINT plant_pkey PRIMARY KEY (plant_id);
4583
4584
4585
--
4586
-- Name: plantobservation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4587
--
4588
4589
ALTER TABLE plantobservation
4590
    ADD CONSTRAINT plantobservation_pkey PRIMARY KEY (plantobservation_id);
4591
4592
4593
--
4594 1113 aaronmk
-- Name: project_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4595 689 aaronmk
--
4596
4597
ALTER TABLE project
4598 1113 aaronmk
    ADD CONSTRAINT project_pkey PRIMARY KEY (project_id);
4599 689 aaronmk
4600
4601
--
4602 1113 aaronmk
-- Name: project_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4603 689 aaronmk
--
4604
4605
ALTER TABLE project
4606 6179 aaronmk
    ADD CONSTRAINT project_unique UNIQUE (source_id, projectname);
4607 689 aaronmk
4608
4609
--
4610
-- Name: projectcontributor_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4611
--
4612
4613
ALTER TABLE projectcontributor
4614
    ADD CONSTRAINT projectcontributor_pkey PRIMARY KEY (projectcontributor_id);
4615
4616
4617
--
4618 6179 aaronmk
-- Name: revision_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4619 689 aaronmk
--
4620
4621 6179 aaronmk
ALTER TABLE revision
4622
    ADD CONSTRAINT revision_pkey PRIMARY KEY (revision_id);
4623 689 aaronmk
4624
4625
--
4626 6482 aaronmk
-- Name: soilsample_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4627 689 aaronmk
--
4628
4629 6482 aaronmk
ALTER TABLE soilsample
4630
    ADD CONSTRAINT soilsample_pkey PRIMARY KEY (soilsample_id);
4631 689 aaronmk
4632
4633
--
4634 6482 aaronmk
-- Name: soilsample_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4635 689 aaronmk
--
4636
4637 6482 aaronmk
ALTER TABLE soilsample
4638
    ADD CONSTRAINT soilsample_unique UNIQUE (locationevent_id);
4639 689 aaronmk
4640
4641
--
4642 6179 aaronmk
-- Name: soiltaxon_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4643 6145 aaronmk
--
4644
4645 6179 aaronmk
ALTER TABLE soiltaxon
4646
    ADD CONSTRAINT soiltaxon_pkey PRIMARY KEY (soiltaxon_id);
4647 6145 aaronmk
4648
4649
--
4650 6179 aaronmk
-- Name: source_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4651 689 aaronmk
--
4652
4653 6179 aaronmk
ALTER TABLE source
4654
    ADD CONSTRAINT source_pkey PRIMARY KEY (source_id);
4655 689 aaronmk
4656
4657
--
4658 6179 aaronmk
-- Name: sourcecontributor_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4659 689 aaronmk
--
4660
4661 6179 aaronmk
ALTER TABLE sourcecontributor
4662
    ADD CONSTRAINT sourcecontributor_pkey PRIMARY KEY (sourcecontributor_id);
4663 689 aaronmk
4664
4665
--
4666 6179 aaronmk
-- Name: sourcename_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4667 689 aaronmk
--
4668
4669 6179 aaronmk
ALTER TABLE sourcename
4670
    ADD CONSTRAINT sourcename_pkey PRIMARY KEY (sourcename_id);
4671 689 aaronmk
4672
4673
--
4674
-- Name: specimen_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4675
--
4676
4677
ALTER TABLE specimen
4678
    ADD CONSTRAINT specimen_pkey PRIMARY KEY (specimen_id);
4679
4680
4681
--
4682 1113 aaronmk
-- Name: specimenreplicate_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4683 689 aaronmk
--
4684
4685
ALTER TABLE specimenreplicate
4686 3934 aaronmk
    ADD CONSTRAINT specimenreplicate_pkey PRIMARY KEY (specimenreplicate_id);
4687 689 aaronmk
4688
4689
--
4690 1113 aaronmk
-- Name: stemobservation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4691 689 aaronmk
--
4692
4693
ALTER TABLE stemobservation
4694 1113 aaronmk
    ADD CONSTRAINT stemobservation_pkey PRIMARY KEY (stemobservation_id);
4695 689 aaronmk
4696
4697
--
4698
-- Name: stratum_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4699
--
4700
4701
ALTER TABLE stratum
4702
    ADD CONSTRAINT stratum_pkey PRIMARY KEY (stratum_id);
4703
4704
4705
--
4706
-- Name: taxonalt_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4707
--
4708
4709
ALTER TABLE taxonalt
4710
    ADD CONSTRAINT taxonalt_pkey PRIMARY KEY (taxonalt_id);
4711
4712
4713
--
4714 5627 aaronmk
-- Name: taxonconcept_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4715
--
4716
4717
ALTER TABLE taxonconcept
4718
    ADD CONSTRAINT taxonconcept_pkey PRIMARY KEY (taxonlabel_id);
4719
4720
4721
--
4722 5608 aaronmk
-- Name: taxoncorrelation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4723 5274 aaronmk
--
4724
4725 5608 aaronmk
ALTER TABLE taxoncorrelation
4726
    ADD CONSTRAINT taxoncorrelation_pkey PRIMARY KEY (taxoncorrelation_id);
4727 5274 aaronmk
4728
4729
--
4730 5608 aaronmk
-- Name: taxondetermination_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4731 5225 aaronmk
--
4732
4733 5608 aaronmk
ALTER TABLE taxondetermination
4734
    ADD CONSTRAINT taxondetermination_pkey PRIMARY KEY (taxondetermination_id);
4735 5225 aaronmk
4736
4737
--
4738 5609 aaronmk
-- Name: taxonlabel_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4739 5286 aaronmk
--
4740
4741 5609 aaronmk
ALTER TABLE taxonlabel
4742
    ADD CONSTRAINT taxonlabel_pkey PRIMARY KEY (taxonlabel_id);
4743 5286 aaronmk
4744
4745
--
4746 5609 aaronmk
-- Name: taxonlabel_relationship_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4747 689 aaronmk
--
4748
4749 5609 aaronmk
ALTER TABLE taxonlabel_relationship
4750
    ADD CONSTRAINT taxonlabel_relationship_pkey PRIMARY KEY (descendant_id, ancestor_id);
4751 689 aaronmk
4752
4753
--
4754 5286 aaronmk
-- Name: taxonlineage_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4755
--
4756
4757
ALTER TABLE taxonlineage
4758
    ADD CONSTRAINT taxonlineage_pkey PRIMARY KEY (taxonlineage_id);
4759
4760
4761
--
4762 689 aaronmk
-- Name: taxonoccurrence_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4763
--
4764
4765
ALTER TABLE taxonoccurrence
4766
    ADD CONSTRAINT taxonoccurrence_pkey PRIMARY KEY (taxonoccurrence_id);
4767
4768
4769
--
4770 5286 aaronmk
-- Name: taxonstatus_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4771
--
4772
4773
ALTER TABLE taxonstatus
4774
    ADD CONSTRAINT taxonstatus_pkey PRIMARY KEY (taxonstatus_id);
4775
4776
4777
--
4778
-- Name: taxonstatus_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4779
--
4780
4781
ALTER TABLE taxonstatus
4782 5608 aaronmk
    ADD CONSTRAINT taxonstatus_unique UNIQUE (taxonlabel_id, party_id);
4783 5286 aaronmk
4784
4785
--
4786 5655 aaronmk
-- Name: taxonverbatim_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4787
--
4788
4789
ALTER TABLE taxonverbatim
4790 5660 aaronmk
    ADD CONSTRAINT taxonverbatim_pkey PRIMARY KEY (taxonverbatim_id);
4791 5655 aaronmk
4792
4793
--
4794 5660 aaronmk
-- Name: taxonverbatim_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4795
--
4796
4797
ALTER TABLE taxonverbatim
4798
    ADD CONSTRAINT taxonverbatim_unique UNIQUE (taxonlabel_id);
4799
4800
4801
--
4802 689 aaronmk
-- Name: telephone_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4803
--
4804
4805
ALTER TABLE telephone
4806
    ADD CONSTRAINT telephone_pkey PRIMARY KEY (telephone_id);
4807
4808
4809
--
4810 6085 aaronmk
-- Name: threatened_taxonlabel_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4811
--
4812
4813
ALTER TABLE threatened_taxonlabel
4814
    ADD CONSTRAINT threatened_taxonlabel_pkey PRIMARY KEY (taxonlabel_id);
4815
4816
4817
--
4818 689 aaronmk
-- Name: trait_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4819
--
4820
4821
ALTER TABLE trait
4822
    ADD CONSTRAINT trait_pkey PRIMARY KEY (trait_id);
4823
4824
4825
--
4826
-- Name: userdefined_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4827
--
4828
4829
ALTER TABLE userdefined
4830
    ADD CONSTRAINT userdefined_pkey PRIMARY KEY (userdefined_id);
4831
4832
4833
--
4834 1221 aaronmk
-- Name: userdefined_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4835
--
4836
4837
ALTER TABLE userdefined
4838
    ADD CONSTRAINT userdefined_unique UNIQUE (tablename, userdefinedname);
4839
4840
4841
--
4842 1113 aaronmk
-- Name: voucher_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4843 689 aaronmk
--
4844
4845
ALTER TABLE voucher
4846 1113 aaronmk
    ADD CONSTRAINT voucher_pkey PRIMARY KEY (voucher_id);
4847 689 aaronmk
4848
4849
--
4850 1113 aaronmk
-- Name: voucher_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
4851 689 aaronmk
--
4852
4853
ALTER TABLE voucher
4854 1113 aaronmk
    ADD CONSTRAINT voucher_unique UNIQUE (taxonoccurrence_id, specimenreplicate_id);
4855 689 aaronmk
4856
4857
--
4858 4791 aaronmk
-- Name: aggregateoccurrence_taxonoccurrence; Type: INDEX; Schema: public; Owner: -; Tablespace:
4859
--
4860
4861
CREATE INDEX aggregateoccurrence_taxonoccurrence ON aggregateoccurrence  (taxonoccurrence_id);
4862
4863
4864
--
4865 3737 aaronmk
-- Name: aggregateoccurrence_taxonoccurrence_1_to_1; Type: INDEX; Schema: public; Owner: -; Tablespace:
4866 3615 aaronmk
--
4867
4868
4869
4870
4871
--
4872 5242 aaronmk
-- Name: aggregateoccurrence_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace:
4873 3712 aaronmk
--
4874
4875
4876
4877
4878
--
4879 6476 aaronmk
-- Name: analytical_aggregate_by_institutionCode; Type: INDEX; Schema: public; Owner: -; Tablespace:
4880
--
4881
4882
CREATE INDEX `analytical_aggregate_by_institutionCode` ON analytical_aggregate  (`institutionCode`, `plotName`, `dateCollected`);
4883
4884
4885
--
4886
-- Name: analytical_stem_by_institutionCode; Type: INDEX; Schema: public; Owner: -; Tablespace:
4887
--
4888
4889
CREATE INDEX `analytical_stem_by_institutionCode` ON analytical_stem  (`institutionCode`, `plotName`, `dateCollected`);
4890
4891
4892
--
4893 689 aaronmk
-- Name: commclass_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
4894
--
4895
4896
CREATE UNIQUE INDEX commclass_accessioncode_index ON commclass  (accessioncode);
4897
4898
4899
--
4900 3214 aaronmk
-- Name: commclass_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
4901
--
4902
4903
4904
4905
4906
--
4907 689 aaronmk
-- Name: commconcept_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
4908
--
4909
4910
CREATE UNIQUE INDEX commconcept_accessioncode_index ON commconcept  (accessioncode);
4911
4912
4913
--
4914
-- Name: commstatus_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
4915
--
4916
4917
CREATE UNIQUE INDEX commstatus_accessioncode_index ON commstatus  (accessioncode);
4918
4919
4920
--
4921 5859 aaronmk
-- Name: coordinates_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
4922
--
4923
4924
4925
4926
4927
--
4928 689 aaronmk
-- Name: covermethod_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
4929
--
4930
4931
CREATE UNIQUE INDEX covermethod_accessioncode_index ON covermethod  (accessioncode);
4932
4933
4934
--
4935
-- Name: graphic_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
4936
--
4937
4938
CREATE UNIQUE INDEX graphic_accessioncode_index ON graphic  (accessioncode);
4939
4940
4941
--
4942 6246 aaronmk
-- Name: higher_plant_group_nodes_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
4943
--
4944
4945
4946
4947
4948
--
4949 689 aaronmk
-- Name: location_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
4950
--
4951
4952
CREATE UNIQUE INDEX location_accessioncode_index ON location  (accessioncode);
4953
4954
4955
--
4956 5759 aaronmk
-- Name: location_creator; Type: INDEX; Schema: public; Owner: -; Tablespace:
4957
--
4958
4959 6179 aaronmk
CREATE INDEX location_creator ON location  (source_id);
4960 5759 aaronmk
4961
4962
--
4963 5760 aaronmk
-- Name: location_parent; Type: INDEX; Schema: public; Owner: -; Tablespace:
4964
--
4965
4966
CREATE INDEX location_parent ON location  (parent_id);
4967
4968
4969
--
4970 5242 aaronmk
-- Name: location_unique_within_creator_by_authorlocationcode; Type: INDEX; Schema: public; Owner: -; Tablespace:
4971 3989 aaronmk
--
4972
4973
4974
4975
4976
--
4977 5242 aaronmk
-- Name: location_unique_within_creator_by_sourceaccessioncode; Type: INDEX; Schema: public; Owner: -; Tablespace:
4978 3615 aaronmk
--
4979
4980
4981
4982 3997 aaronmk
4983 3615 aaronmk
--
4984 3988 aaronmk
-- Name: location_unique_within_parent; Type: INDEX; Schema: public; Owner: -; Tablespace:
4985 3986 aaronmk
--
4986
4987
4988
4989
4990
--
4991 689 aaronmk
-- Name: locationevent_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
4992
--
4993
4994
CREATE UNIQUE INDEX locationevent_accessioncode_index ON locationevent  (accessioncode);
4995
4996
4997
--
4998 4791 aaronmk
-- Name: locationevent_location; Type: INDEX; Schema: public; Owner: -; Tablespace:
4999
--
5000
5001
CREATE INDEX locationevent_location ON locationevent  (location_id);
5002
5003
5004
--
5005 5242 aaronmk
-- Name: locationevent_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace:
5006 689 aaronmk
--
5007
5008
5009
5010 3219 aaronmk
5011 689 aaronmk
--
5012 3733 aaronmk
-- Name: locationevent_unique_within_location; Type: INDEX; Schema: public; Owner: -; Tablespace:
5013 3615 aaronmk
--
5014
5015
5016
5017
5018
--
5019 3953 aaronmk
-- Name: locationevent_unique_within_parent_by_authoreventcode; Type: INDEX; Schema: public; Owner: -; Tablespace:
5020 689 aaronmk
--
5021
5022
5023
5024 3234 aaronmk
5025 689 aaronmk
--
5026 3733 aaronmk
-- Name: locationevent_unique_within_parent_by_location; Type: INDEX; Schema: public; Owner: -; Tablespace:
5027 2886 aaronmk
--
5028
5029
5030
5031
5032
--
5033 3733 aaronmk
-- Name: locationevent_unique_within_project; Type: INDEX; Schema: public; Owner: -; Tablespace:
5034 3202 aaronmk
--
5035
5036
5037
5038
5039
--
5040 689 aaronmk
-- Name: locationeventsynonym_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
5041
--
5042
5043
CREATE UNIQUE INDEX locationeventsynonym_accessioncode_index ON locationeventsynonym  (accessioncode);
5044
5045
5046
--
5047 4734 aaronmk
-- Name: locationplace_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
5048
--
5049
5050
5051
5052
5053
--
5054 907 aaronmk
-- Name: method_accessioncode; Type: INDEX; Schema: public; Owner: -; Tablespace:
5055
--
5056
5057
CREATE UNIQUE INDEX method_accessioncode ON method  (accessioncode);
5058
5059
5060
--
5061 1113 aaronmk
-- Name: method_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
5062 1067 aaronmk
--
5063
5064
5065
5066
5067
--
5068 4730 aaronmk
-- Name: note_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
5069 689 aaronmk
--
5070
5071 4730 aaronmk
CREATE UNIQUE INDEX note_accessioncode_index ON note  (accessioncode);
5072 689 aaronmk
5073
5074
--
5075 4730 aaronmk
-- Name: party_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
5076 2869 aaronmk
--
5077
5078 4730 aaronmk
CREATE UNIQUE INDEX party_accessioncode_index ON party  (accessioncode);
5079 2869 aaronmk
5080
5081
--
5082 5952 aaronmk
-- Name: party_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
5083 689 aaronmk
--
5084
5085
5086
5087 4730 aaronmk
5088 689 aaronmk
--
5089 5992 aaronmk
-- Name: place_matched_place_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
5090
--
5091
5092
CREATE INDEX place_matched_place_id_idx ON place  (matched_place_id);
5093
5094
5095
--
5096 5855 aaronmk
-- Name: place_unique_within_creator_by_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
5097 1247 aaronmk
--
5098
5099
5100
5101
5102
--
5103 5855 aaronmk
-- Name: placename_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
5104 4727 aaronmk
--
5105
5106
5107
5108
5109
--
5110 3735 aaronmk
-- Name: plantobservation_aggregateoccurrence_1_to_1; Type: INDEX; Schema: public; Owner: -; Tablespace:
5111
--
5112
5113
CREATE UNIQUE INDEX plantobservation_aggregateoccurrence_1_to_1 ON plantobservation  (aggregateoccurrence_id);
5114
5115
5116
--
5117 5242 aaronmk
-- Name: plantobservation_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace:
5118 3615 aaronmk
--
5119
5120
5121
5122
5123
--
5124 689 aaronmk
-- Name: project_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
5125
--
5126
5127
CREATE UNIQUE INDEX project_accessioncode_index ON project  (accessioncode);
5128
5129
5130
--
5131 4468 aaronmk
-- Name: project_unique_name_date; Type: INDEX; Schema: public; Owner: -; Tablespace:
5132
--
5133
5134
5135
5136
5137
--
5138 5242 aaronmk
-- Name: project_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace:
5139 3615 aaronmk
--
5140
5141
5142
5143
5144
--
5145 6179 aaronmk
-- Name: soiltaxon_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
5146 689 aaronmk
--
5147
5148 6179 aaronmk
CREATE UNIQUE INDEX soiltaxon_accessioncode_index ON soiltaxon  (accessioncode);
5149 689 aaronmk
5150
5151
--
5152 6179 aaronmk
-- Name: source_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
5153 5951 aaronmk
--
5154
5155 6179 aaronmk
CREATE UNIQUE INDEX source_accessioncode_index ON source  (accessioncode);
5156 5951 aaronmk
5157
5158
--
5159 6179 aaronmk
-- Name: source_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
5160 689 aaronmk
--
5161
5162 6383 aaronmk
CREATE UNIQUE INDEX source_unique ON source  (shortname);
5163 689 aaronmk
5164
5165
--
5166 6179 aaronmk
-- Name: sourcename_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
5167 689 aaronmk
--
5168
5169
5170
5171 6179 aaronmk
5172 689 aaronmk
--
5173 4792 aaronmk
-- Name: specimenreplicate_plantobservation; Type: INDEX; Schema: public; Owner: -; Tablespace:
5174
--
5175
5176
CREATE INDEX specimenreplicate_plantobservation ON specimenreplicate  (plantobservation_id);
5177
5178
5179
--
5180 3734 aaronmk
-- Name: specimenreplicate_plantobservation_1_to_1; Type: INDEX; Schema: public; Owner: -; Tablespace:
5181 3232 aaronmk
--
5182
5183
5184
5185
5186
--
5187 3734 aaronmk
-- Name: specimenreplicate_unique_catalognumber; Type: INDEX; Schema: public; Owner: -; Tablespace:
5188 1253 aaronmk
--
5189
5190
5191
5192
5193
--
5194 5242 aaronmk
-- Name: specimenreplicate_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace:
5195 3342 aaronmk
--
5196
5197
5198
5199
5200
--
5201 3736 aaronmk
-- Name: stemobservation_plantobservation_1_to_1; Type: INDEX; Schema: public; Owner: -; Tablespace:
5202 3615 aaronmk
--
5203
5204
5205
5206
5207
--
5208 5758 aaronmk
-- Name: stemobservation_plantobservation_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
5209
--
5210
5211
CREATE INDEX stemobservation_plantobservation_id ON stemobservation  (plantobservation_id);
5212
5213
5214
--
5215 5242 aaronmk
-- Name: stemobservation_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace:
5216 3727 aaronmk
--
5217
5218
5219
5220
5221
--
5222 3740 aaronmk
-- Name: stemobservation_unique_within_plantobservation; Type: INDEX; Schema: public; Owner: -; Tablespace:
5223
--
5224
5225
5226
5227
5228
--
5229 5608 aaronmk
-- Name: taxondetermination_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
5230 689 aaronmk
--
5231
5232 5608 aaronmk
CREATE UNIQUE INDEX taxondetermination_accessioncode_index ON taxondetermination  (accessioncode);
5233 689 aaronmk
5234
5235
--
5236 6419 aaronmk
-- Name: taxondetermination_single_current_determination; Type: INDEX; Schema: public; Owner: -; Tablespace:
5237
--
5238
5239
5240
5241
5242
--
5243 5608 aaronmk
-- Name: taxondetermination_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
5244 5469 aaronmk
--
5245
5246
5247
5248
5249
--
5250 5608 aaronmk
-- Name: taxonlabel_0_unique_identifying_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
5251 1113 aaronmk
--
5252
5253
5254
5255 5608 aaronmk
5256 1113 aaronmk
--
5257 5608 aaronmk
-- Name: taxonlabel_1_unique_sourceaccessioncode; Type: INDEX; Schema: public; Owner: -; Tablespace:
5258 5546 aaronmk
--
5259
5260
5261
5262 5608 aaronmk
5263 5546 aaronmk
--
5264 5608 aaronmk
-- Name: taxonlabel_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
5265 5517 aaronmk
--
5266
5267 5608 aaronmk
CREATE UNIQUE INDEX taxonlabel_accessioncode_index ON taxonlabel  (accessioncode);
5268 5517 aaronmk
5269
5270
--
5271 5609 aaronmk
-- Name: taxonlabel_matched_label_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
5272 5267 aaronmk
--
5273
5274 5609 aaronmk
CREATE INDEX taxonlabel_matched_label_id_idx ON taxonlabel  (matched_label_id);
5275 5267 aaronmk
5276
5277
--
5278 5609 aaronmk
-- Name: taxonlabel_relationship_descendants; Type: INDEX; Schema: public; Owner: -; Tablespace:
5279 4791 aaronmk
--
5280
5281 5609 aaronmk
CREATE INDEX taxonlabel_relationship_descendants ON taxonlabel_relationship  (ancestor_id, descendant_id);
5282 4791 aaronmk
5283
5284
--
5285 5608 aaronmk
-- Name: taxonlabel_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
5286 3615 aaronmk
--
5287
5288
5289
5290
5291
--
5292 5225 aaronmk
-- Name: taxonoccurrence_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
5293 3711 aaronmk
--
5294
5295 5225 aaronmk
CREATE UNIQUE INDEX taxonoccurrence_accessioncode_index ON taxonoccurrence  (accessioncode);
5296 3711 aaronmk
5297
5298
--
5299 5225 aaronmk
-- Name: taxonoccurrence_locationevent; Type: INDEX; Schema: public; Owner: -; Tablespace:
5300 4718 aaronmk
--
5301
5302 5225 aaronmk
CREATE INDEX taxonoccurrence_locationevent ON taxonoccurrence  (locationevent_id);
5303 4718 aaronmk
5304
5305
--
5306 5242 aaronmk
-- Name: taxonoccurrence_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace:
5307 4718 aaronmk
--
5308
5309
5310
5311 5134 aaronmk
5312 4718 aaronmk
--
5313 5225 aaronmk
-- Name: taxonoccurrence_unique_within_locationevent; Type: INDEX; Schema: public; Owner: -; Tablespace:
5314 5134 aaronmk
--
5315
5316
5317
5318
5319
--
5320 5286 aaronmk
-- Name: taxonstatus_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
5321
--
5322
5323
CREATE UNIQUE INDEX taxonstatus_accessioncode_index ON taxonstatus  (accessioncode);
5324
5325
5326
--
5327 689 aaronmk
-- Name: userdefined_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
5328
--
5329
5330
CREATE UNIQUE INDEX userdefined_accessioncode_index ON userdefined  (accessioncode);
5331
5332
5333
--
5334 6179 aaronmk
-- Name: party_source_id_self_ref; Type: TRIGGER; Schema: public; Owner: -
5335 5234 aaronmk
--
5336
5337
5338
5339
5340
--
5341 5855 aaronmk
-- Name: place_matched_place_id_self_ref; Type: TRIGGER; Schema: public; Owner: -
5342 704 aaronmk
--
5343
5344
5345
5346 705 aaronmk
5347 704 aaronmk
--
5348 5984 aaronmk
-- Name: place_set_canon_place_id_on_insert; Type: TRIGGER; Schema: public; Owner: -
5349
--
5350
5351
5352
5353
5354
--
5355
-- Name: place_set_canon_place_id_on_update; Type: TRIGGER; Schema: public; Owner: -
5356
--
5357
5358
5359
5360
5361
--
5362 5855 aaronmk
-- Name: placename_update_ancestors; Type: TRIGGER; Schema: public; Owner: -
5363 5032 aaronmk
--
5364
5365
5366
5367
5368
--
5369 4717 aaronmk
-- Name: plantobservation_aggregateoccurrence_count_1; Type: TRIGGER; Schema: public; Owner: -
5370 1555 aaronmk
--
5371
5372
5373
5374
5375
--
5376 6421 aaronmk
-- Name: taxondetermination_set_iscurrent; Type: TRIGGER; Schema: public; Owner: -
5377
--
5378
5379
5380
5381
5382
--
5383 5608 aaronmk
-- Name: taxonlabel_0_matched_label_id_self_ref; Type: TRIGGER; Schema: public; Owner: -
5384 5032 aaronmk
--
5385
5386
5387
5388
5389
--
5390 5608 aaronmk
-- Name: taxonlabel_1_matched_label_min_fit; Type: TRIGGER; Schema: public; Owner: -
5391 5412 aaronmk
--
5392
5393
5394
5395
5396
--
5397 5705 aaronmk
-- Name: taxonlabel_2_set_canon_label_id_on_insert; Type: TRIGGER; Schema: public; Owner: -
5398 5473 aaronmk
--
5399
5400
5401
5402
5403
--
5404 5705 aaronmk
-- Name: taxonlabel_2_set_canon_label_id_on_update; Type: TRIGGER; Schema: public; Owner: -
5405
--
5406
5407
5408
5409
5410
--
5411 5608 aaronmk
-- Name: taxonlabel_3_parent_id_avoid_self_ref; Type: TRIGGER; Schema: public; Owner: -
5412 5547 aaronmk
--
5413
5414
5415
5416
5417
--
5418 5608 aaronmk
-- Name: taxonlabel_update_ancestors_on_insert; Type: TRIGGER; Schema: public; Owner: -
5419 5274 aaronmk
--
5420
5421
5422
5423
5424
--
5425 5608 aaronmk
-- Name: taxonlabel_update_ancestors_on_update; Type: TRIGGER; Schema: public; Owner: -
5426 5548 aaronmk
--
5427
5428
5429
5430
5431
--
5432 3731 aaronmk
-- Name: address_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5433 689 aaronmk
--
5434
5435
ALTER TABLE address
5436 3731 aaronmk
    ADD CONSTRAINT address_organization_id_fkey FOREIGN KEY (organization_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5437 689 aaronmk
5438
5439
--
5440 3731 aaronmk
-- Name: address_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5441 689 aaronmk
--
5442
5443
ALTER TABLE address
5444 3731 aaronmk
    ADD CONSTRAINT address_party_id_fkey FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5445 689 aaronmk
5446
5447
--
5448 3731 aaronmk
-- Name: aggregateoccurrence_coverindex_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5449 1151 aaronmk
--
5450
5451
5452
5453 3992 aaronmk
5454 1151 aaronmk
--
5455 5953 aaronmk
-- Name: aggregateoccurrence_method_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5456 3654 aaronmk
--
5457
5458
5459
5460
5461
--
5462 6179 aaronmk
-- Name: aggregateoccurrence_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5463 1028 aaronmk
--
5464
5465
5466
5467 3992 aaronmk
5468 1028 aaronmk
--
5469 3731 aaronmk
-- Name: aggregateoccurrence_stratum_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5470 689 aaronmk
--
5471
5472
ALTER TABLE aggregateoccurrence
5473 3731 aaronmk
    ADD CONSTRAINT aggregateoccurrence_stratum_id_fkey FOREIGN KEY (stratum_id) REFERENCES stratum(stratum_id) ON UPDATE CASCADE ON DELETE CASCADE;
5474 689 aaronmk
5475
5476
--
5477 3731 aaronmk
-- Name: aggregateoccurrence_taxonoccurrence_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5478 689 aaronmk
--
5479
5480
ALTER TABLE aggregateoccurrence
5481 3731 aaronmk
    ADD CONSTRAINT aggregateoccurrence_taxonoccurrence_id_fkey FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE;
5482 689 aaronmk
5483
5484
--
5485 3731 aaronmk
-- Name: classcontributor_commclass_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5486 689 aaronmk
--
5487
5488
ALTER TABLE classcontributor
5489 3731 aaronmk
    ADD CONSTRAINT classcontributor_commclass_id_fkey FOREIGN KEY (commclass_id) REFERENCES commclass(commclass_id) ON UPDATE CASCADE ON DELETE CASCADE;
5490 689 aaronmk
5491
5492
--
5493 3731 aaronmk
-- Name: classcontributor_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5494 689 aaronmk
--
5495
5496
5497
5498 812 aaronmk
5499 689 aaronmk
--
5500 3731 aaronmk
-- Name: commclass_classpublication_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5501 689 aaronmk
--
5502
5503
5504
5505 812 aaronmk
5506 689 aaronmk
--
5507 3731 aaronmk
-- Name: commclass_locationevent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5508 689 aaronmk
--
5509
5510
5511
5512 3992 aaronmk
5513 689 aaronmk
--
5514 3731 aaronmk
-- Name: commconcept_commname_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5515 689 aaronmk
--
5516
5517
ALTER TABLE commconcept
5518 3731 aaronmk
    ADD CONSTRAINT commconcept_commname_id_fkey FOREIGN KEY (commname_id) REFERENCES commname(commname_id) ON UPDATE CASCADE ON DELETE CASCADE;
5519 689 aaronmk
5520
5521
--
5522 6483 aaronmk
-- Name: commconcept_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5523 689 aaronmk
--
5524
5525
5526
5527 812 aaronmk
5528 689 aaronmk
--
5529 3731 aaronmk
-- Name: commcorrelation_commconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5530 689 aaronmk
--
5531
5532
ALTER TABLE commcorrelation
5533 3731 aaronmk
    ADD CONSTRAINT commcorrelation_commconcept_id_fkey FOREIGN KEY (commconcept_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
5534 689 aaronmk
5535
5536
--
5537 3731 aaronmk
-- Name: commcorrelation_commstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5538 689 aaronmk
--
5539
5540
ALTER TABLE commcorrelation
5541 3731 aaronmk
    ADD CONSTRAINT commcorrelation_commstatus_id_fkey FOREIGN KEY (commstatus_id) REFERENCES commstatus(commstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
5542 689 aaronmk
5543
5544
--
5545 3731 aaronmk
-- Name: commdetermination_commauthority_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5546 689 aaronmk
--
5547
5548
5549
5550 812 aaronmk
5551 689 aaronmk
--
5552 3731 aaronmk
-- Name: commdetermination_commclass_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5553 689 aaronmk
--
5554
5555
ALTER TABLE commdetermination
5556 3731 aaronmk
    ADD CONSTRAINT commdetermination_commclass_id_fkey FOREIGN KEY (commclass_id) REFERENCES commclass(commclass_id) ON UPDATE CASCADE ON DELETE CASCADE;
5557 689 aaronmk
5558
5559
--
5560 3731 aaronmk
-- Name: commdetermination_commconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5561 689 aaronmk
--
5562
5563
ALTER TABLE commdetermination
5564 3731 aaronmk
    ADD CONSTRAINT commdetermination_commconcept_id_fkey FOREIGN KEY (commconcept_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
5565 689 aaronmk
5566
5567
--
5568 3731 aaronmk
-- Name: commlineage_childcommstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5569 689 aaronmk
--
5570
5571
ALTER TABLE commlineage
5572 3731 aaronmk
    ADD CONSTRAINT commlineage_childcommstatus_id_fkey FOREIGN KEY (childcommstatus_id) REFERENCES commstatus(commstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
5573 689 aaronmk
5574
5575
--
5576 3731 aaronmk
-- Name: commlineage_parentcommstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5577 689 aaronmk
--
5578
5579
ALTER TABLE commlineage
5580 3731 aaronmk
    ADD CONSTRAINT commlineage_parentcommstatus_id_fkey FOREIGN KEY (parentcommstatus_id) REFERENCES commstatus(commstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
5581 689 aaronmk
5582
5583
--
5584 6179 aaronmk
-- Name: commname_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5585 689 aaronmk
--
5586
5587
5588
5589 812 aaronmk
5590 689 aaronmk
--
5591 3731 aaronmk
-- Name: commstatus_commconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5592 689 aaronmk
--
5593
5594
ALTER TABLE commstatus
5595 3731 aaronmk
    ADD CONSTRAINT commstatus_commconcept_id_fkey FOREIGN KEY (commconcept_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
5596 689 aaronmk
5597
5598
--
5599 3731 aaronmk
-- Name: commstatus_commparent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5600 689 aaronmk
--
5601
5602
ALTER TABLE commstatus
5603 3731 aaronmk
    ADD CONSTRAINT commstatus_commparent_id_fkey FOREIGN KEY (commparent_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
5604 689 aaronmk
5605
5606
--
5607 3731 aaronmk
-- Name: commstatus_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5608 689 aaronmk
--
5609
5610
5611
5612 812 aaronmk
5613 689 aaronmk
--
5614 6179 aaronmk
-- Name: commstatus_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5615 689 aaronmk
--
5616
5617
5618
5619 812 aaronmk
5620 689 aaronmk
--
5621 3731 aaronmk
-- Name: commusage_commconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5622 689 aaronmk
--
5623
5624
ALTER TABLE commusage
5625 3731 aaronmk
    ADD CONSTRAINT commusage_commconcept_id_fkey FOREIGN KEY (commconcept_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
5626 689 aaronmk
5627
5628
--
5629 3731 aaronmk
-- Name: commusage_commname_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5630 689 aaronmk
--
5631
5632
ALTER TABLE commusage
5633 3731 aaronmk
    ADD CONSTRAINT commusage_commname_id_fkey FOREIGN KEY (commname_id) REFERENCES commname(commname_id) ON UPDATE CASCADE ON DELETE CASCADE;
5634 689 aaronmk
5635
5636
--
5637 3731 aaronmk
-- Name: commusage_commstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5638 689 aaronmk
--
5639
5640
ALTER TABLE commusage
5641 3731 aaronmk
    ADD CONSTRAINT commusage_commstatus_id_fkey FOREIGN KEY (commstatus_id) REFERENCES commstatus(commstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
5642 689 aaronmk
5643
5644
--
5645 3731 aaronmk
-- Name: commusage_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5646 689 aaronmk
--
5647
5648
5649
5650 812 aaronmk
5651 689 aaronmk
--
5652 6179 aaronmk
-- Name: coordinates_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5653 5859 aaronmk
--
5654
5655
5656
5657
5658
--
5659 3731 aaronmk
-- Name: coverindex_covermethod_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5660 689 aaronmk
--
5661
5662
ALTER TABLE coverindex
5663 3731 aaronmk
    ADD CONSTRAINT coverindex_covermethod_id_fkey FOREIGN KEY (covermethod_id) REFERENCES covermethod(covermethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
5664 689 aaronmk
5665
5666
--
5667 6179 aaronmk
-- Name: covermethod_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5668 689 aaronmk
--
5669
5670
5671
5672 812 aaronmk
5673 689 aaronmk
--
5674 3731 aaronmk
-- Name: definedvalue_userdefined_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5675 689 aaronmk
--
5676
5677
ALTER TABLE definedvalue
5678 3731 aaronmk
    ADD CONSTRAINT definedvalue_userdefined_id_fkey FOREIGN KEY (userdefined_id) REFERENCES userdefined(userdefined_id) ON UPDATE CASCADE ON DELETE CASCADE;
5679 689 aaronmk
5680
5681
--
5682 3731 aaronmk
-- Name: disturbanceobs_locationevent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5683 689 aaronmk
--
5684
5685
ALTER TABLE disturbanceobs
5686 3731 aaronmk
    ADD CONSTRAINT disturbanceobs_locationevent_id_fkey FOREIGN KEY (locationevent_id) REFERENCES locationevent(locationevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
5687 689 aaronmk
5688
5689
--
5690 3731 aaronmk
-- Name: graphic_locationevent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5691 689 aaronmk
--
5692
5693
ALTER TABLE graphic
5694 3731 aaronmk
    ADD CONSTRAINT graphic_locationevent_id_fkey FOREIGN KEY (locationevent_id) REFERENCES locationevent(locationevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
5695 689 aaronmk
5696
5697
--
5698 3731 aaronmk
-- Name: location_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5699 689 aaronmk
--
5700
5701
ALTER TABLE location
5702 3731 aaronmk
    ADD CONSTRAINT location_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES location(location_id) ON UPDATE CASCADE ON DELETE CASCADE;
5703 689 aaronmk
5704
5705
--
5706 6179 aaronmk
-- Name: location_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5707 3654 aaronmk
--
5708
5709
5710
5711
5712
--
5713 3731 aaronmk
-- Name: locationevent_location_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5714 689 aaronmk
--
5715
5716
ALTER TABLE locationevent
5717 3731 aaronmk
    ADD CONSTRAINT locationevent_location_id_fkey FOREIGN KEY (location_id) REFERENCES location(location_id) ON UPDATE CASCADE ON DELETE CASCADE;
5718 689 aaronmk
5719
5720
--
5721 3731 aaronmk
-- Name: locationevent_method_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5722 898 aaronmk
--
5723
5724
5725
5726 3992 aaronmk
5727 898 aaronmk
--
5728 3731 aaronmk
-- Name: locationevent_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5729 910 aaronmk
--
5730
5731
ALTER TABLE locationevent
5732 3731 aaronmk
    ADD CONSTRAINT locationevent_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES locationevent(locationevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
5733 910 aaronmk
5734
5735
--
5736 3731 aaronmk
-- Name: locationevent_previous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5737 689 aaronmk
--
5738
5739
ALTER TABLE locationevent
5740 3731 aaronmk
    ADD CONSTRAINT locationevent_previous_id_fkey FOREIGN KEY (previous_id) REFERENCES locationevent(locationevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
5741 689 aaronmk
5742
5743
--
5744 3731 aaronmk
-- Name: locationevent_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5745 689 aaronmk
--
5746
5747
ALTER TABLE locationevent
5748 3731 aaronmk
    ADD CONSTRAINT locationevent_project_id_fkey FOREIGN KEY (project_id) REFERENCES project(project_id) ON UPDATE CASCADE ON DELETE CASCADE;
5749 689 aaronmk
5750
5751
--
5752 6179 aaronmk
-- Name: locationevent_soiltaxon_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5753 5953 aaronmk
--
5754
5755 6179 aaronmk
ALTER TABLE locationevent
5756
    ADD CONSTRAINT locationevent_soiltaxon_id_fkey FOREIGN KEY (soiltaxon_id) REFERENCES soiltaxon(soiltaxon_id) ON UPDATE CASCADE ON DELETE CASCADE;
5757 5953 aaronmk
5758
5759
--
5760 6179 aaronmk
-- Name: locationevent_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5761 689 aaronmk
--
5762
5763
5764
5765 6179 aaronmk
5766 689 aaronmk
--
5767 3731 aaronmk
-- Name: locationeventcontributor_locationevent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5768 689 aaronmk
--
5769
5770
ALTER TABLE locationeventcontributor
5771 3731 aaronmk
    ADD CONSTRAINT locationeventcontributor_locationevent_id_fkey FOREIGN KEY (locationevent_id) REFERENCES locationevent(locationevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
5772 689 aaronmk
5773
5774
--
5775 3731 aaronmk
-- Name: locationeventcontributor_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5776 689 aaronmk
--
5777
5778
5779
5780 812 aaronmk
5781 689 aaronmk
--
5782 3731 aaronmk
-- Name: locationeventsynonym_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5783 689 aaronmk
--
5784
5785
5786
5787 812 aaronmk
5788 689 aaronmk
--
5789 3731 aaronmk
-- Name: locationeventsynonym_primarylocationevent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5790 689 aaronmk
--
5791
5792
ALTER TABLE locationeventsynonym
5793 3731 aaronmk
    ADD CONSTRAINT locationeventsynonym_primarylocationevent_id_fkey FOREIGN KEY (primarylocationevent_id) REFERENCES locationevent(locationevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
5794 689 aaronmk
5795
5796
--
5797 3731 aaronmk
-- Name: locationeventsynonym_synonymlocationevent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5798 689 aaronmk
--
5799
5800
ALTER TABLE locationeventsynonym
5801 3731 aaronmk
    ADD CONSTRAINT locationeventsynonym_synonymlocationevent_id_fkey FOREIGN KEY (synonymlocationevent_id) REFERENCES locationevent(locationevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
5802 689 aaronmk
5803
5804
--
5805 4734 aaronmk
-- Name: locationplace_identifier_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5806
--
5807
5808
5809
5810
5811
--
5812 4726 aaronmk
-- Name: locationplace_location_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5813
--
5814
5815
ALTER TABLE locationplace
5816
    ADD CONSTRAINT locationplace_location_id_fkey FOREIGN KEY (location_id) REFERENCES location(location_id) ON UPDATE CASCADE ON DELETE CASCADE;
5817
5818
5819
--
5820 5855 aaronmk
-- Name: locationplace_place_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5821 4726 aaronmk
--
5822
5823
ALTER TABLE locationplace
5824 5855 aaronmk
    ADD CONSTRAINT locationplace_place_id_fkey FOREIGN KEY (place_id) REFERENCES place(place_id) ON UPDATE CASCADE ON DELETE CASCADE;
5825 4726 aaronmk
5826
5827
--
5828 3731 aaronmk
-- Name: method_covermethod_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5829 1031 aaronmk
--
5830
5831
ALTER TABLE method
5832 3731 aaronmk
    ADD CONSTRAINT method_covermethod_id_fkey FOREIGN KEY (covermethod_id) REFERENCES covermethod(covermethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
5833 1031 aaronmk
5834
5835
--
5836 6179 aaronmk
-- Name: method_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5837 907 aaronmk
--
5838
5839
5840
5841
5842
--
5843 3731 aaronmk
-- Name: method_subplotmethod_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5844 1162 aaronmk
--
5845
5846
ALTER TABLE method
5847 3731 aaronmk
    ADD CONSTRAINT method_subplotmethod_id_fkey FOREIGN KEY (subplotmethod_id) REFERENCES method(method_id) ON UPDATE CASCADE ON DELETE SET NULL;
5848 1162 aaronmk
5849
5850
--
5851 3731 aaronmk
-- Name: methodtaxonclass_method_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5852 1101 aaronmk
--
5853
5854
ALTER TABLE methodtaxonclass
5855 3731 aaronmk
    ADD CONSTRAINT methodtaxonclass_method_id_fkey FOREIGN KEY (method_id) REFERENCES method(method_id) ON UPDATE CASCADE ON DELETE CASCADE;
5856 1101 aaronmk
5857
5858
--
5859 4718 aaronmk
-- Name: methodtaxonclass_submethod_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5860 1101 aaronmk
--
5861
5862
5863
5864 5625 aaronmk
5865 1101 aaronmk
--
5866 5608 aaronmk
-- Name: methodtaxonclass_taxonlabel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5867 1105 aaronmk
--
5868
5869
ALTER TABLE methodtaxonclass
5870 5608 aaronmk
    ADD CONSTRAINT methodtaxonclass_taxonlabel_id_fkey FOREIGN KEY (taxonlabel_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
5871 1105 aaronmk
5872
5873
--
5874 4730 aaronmk
-- Name: note_notelink_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5875 1555 aaronmk
--
5876
5877 4730 aaronmk
ALTER TABLE note
5878
    ADD CONSTRAINT note_notelink_id_fkey FOREIGN KEY (notelink_id) REFERENCES notelink(notelink_id) ON UPDATE CASCADE ON DELETE CASCADE;
5879 1555 aaronmk
5880
5881
--
5882 4730 aaronmk
-- Name: note_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5883 1555 aaronmk
--
5884
5885
5886
5887 4730 aaronmk
5888 1555 aaronmk
--
5889 5953 aaronmk
-- Name: party_currentname_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5890 689 aaronmk
--
5891
5892 5953 aaronmk
ALTER TABLE party
5893
    ADD CONSTRAINT party_currentname_id_fkey FOREIGN KEY (currentname_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5894 689 aaronmk
5895
5896
--
5897 6179 aaronmk
-- Name: party_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5898 5234 aaronmk
--
5899
5900
5901
5902 5953 aaronmk
5903 5234 aaronmk
--
5904 4730 aaronmk
-- Name: partymember_childparty_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5905 689 aaronmk
--
5906
5907 4730 aaronmk
ALTER TABLE partymember
5908
    ADD CONSTRAINT partymember_childparty_id_fkey FOREIGN KEY (childparty_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5909 689 aaronmk
5910
5911
--
5912 4730 aaronmk
-- Name: partymember_parentparty_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5913 689 aaronmk
--
5914
5915 4730 aaronmk
ALTER TABLE partymember
5916
    ADD CONSTRAINT partymember_parentparty_id_fkey FOREIGN KEY (parentparty_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5917 689 aaronmk
5918
5919
--
5920 5983 aaronmk
-- Name: place_canon_place_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5921
--
5922
5923
5924
5925
5926
--
5927 5860 aaronmk
-- Name: place_coordinates_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5928
--
5929
5930
ALTER TABLE place
5931
    ADD CONSTRAINT place_coordinates_id_fkey FOREIGN KEY (coordinates_id) REFERENCES coordinates(coordinates_id) ON UPDATE CASCADE ON DELETE CASCADE;
5932
5933
5934
--
5935 5855 aaronmk
-- Name: place_matched_place_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5936
--
5937
5938
ALTER TABLE place
5939
    ADD CONSTRAINT place_matched_place_id_fkey FOREIGN KEY (matched_place_id) REFERENCES place(place_id) ON UPDATE CASCADE ON DELETE CASCADE;
5940
5941
5942
--
5943
-- Name: place_place_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5944
--
5945
5946
ALTER TABLE place
5947
    ADD CONSTRAINT place_place_id_fkey FOREIGN KEY (placename_id) REFERENCES placename(placename_id) ON UPDATE CASCADE ON DELETE CASCADE;
5948
5949
5950
--
5951 6179 aaronmk
-- Name: place_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5952 5953 aaronmk
--
5953
5954
5955
5956
5957
--
5958 5854 aaronmk
-- Name: placecorrelation_childplace_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5959 689 aaronmk
--
5960
5961 5854 aaronmk
ALTER TABLE placecorrelation
5962
    ADD CONSTRAINT placecorrelation_childplace_id_fkey FOREIGN KEY (childplace_id) REFERENCES placename(placename_id) ON UPDATE CASCADE ON DELETE CASCADE;
5963 689 aaronmk
5964
5965
--
5966 5854 aaronmk
-- Name: placecorrelation_parentplace_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5967 689 aaronmk
--
5968
5969 5854 aaronmk
ALTER TABLE placecorrelation
5970
    ADD CONSTRAINT placecorrelation_parentplace_id_fkey FOREIGN KEY (parentplace_id) REFERENCES placename(placename_id) ON UPDATE CASCADE ON DELETE CASCADE;
5971 689 aaronmk
5972
5973
--
5974 5854 aaronmk
-- Name: placename_ancestor_ancestor_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5975 689 aaronmk
--
5976
5977 5854 aaronmk
ALTER TABLE placename_ancestor
5978
    ADD CONSTRAINT placename_ancestor_ancestor_id_fkey FOREIGN KEY (ancestor_id) REFERENCES placename(placename_id) ON UPDATE CASCADE ON DELETE CASCADE;
5979 689 aaronmk
5980
5981
--
5982 5854 aaronmk
-- Name: placename_ancestor_place_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5983 689 aaronmk
--
5984
5985 5854 aaronmk
ALTER TABLE placename_ancestor
5986
    ADD CONSTRAINT placename_ancestor_place_id_fkey FOREIGN KEY (placename_id) REFERENCES placename(placename_id) ON UPDATE CASCADE ON DELETE CASCADE;
5987 689 aaronmk
5988
5989
--
5990 5854 aaronmk
-- Name: placename_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5991 689 aaronmk
--
5992
5993 5854 aaronmk
ALTER TABLE placename
5994
    ADD CONSTRAINT placename_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES placename(placename_id) ON UPDATE CASCADE ON DELETE CASCADE;
5995 689 aaronmk
5996
5997
--
5998 3731 aaronmk
-- Name: plantobservation_aggregateoccurrence_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5999 3722 aaronmk
--
6000
6001
ALTER TABLE plantobservation
6002 3731 aaronmk
    ADD CONSTRAINT plantobservation_aggregateoccurrence_id_fkey FOREIGN KEY (aggregateoccurrence_id) REFERENCES aggregateoccurrence(aggregateoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE;
6003 3722 aaronmk
6004
6005
--
6006 5953 aaronmk
-- Name: plantobservation_plant_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6007 3654 aaronmk
--
6008
6009 5953 aaronmk
ALTER TABLE plantobservation
6010
    ADD CONSTRAINT plantobservation_plant_id_fkey FOREIGN KEY (plant_id) REFERENCES plant(plant_id) ON UPDATE CASCADE ON DELETE CASCADE;
6011 3654 aaronmk
6012
6013
--
6014 6179 aaronmk
-- Name: plantobservation_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6015 689 aaronmk
--
6016
6017
6018
6019 5953 aaronmk
6020 689 aaronmk
--
6021 6179 aaronmk
-- Name: project_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6022 719 aaronmk
--
6023
6024
6025
6026 812 aaronmk
6027 719 aaronmk
--
6028 3731 aaronmk
-- Name: projectcontributor_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6029 689 aaronmk
--
6030
6031
6032
6033 812 aaronmk
6034 689 aaronmk
--
6035 3731 aaronmk
-- Name: projectcontributor_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6036 689 aaronmk
--
6037
6038
6039
6040 6248 aaronmk
6041 689 aaronmk
--
6042 6179 aaronmk
-- Name: revision_previousrevision_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6043 689 aaronmk
--
6044
6045 6179 aaronmk
ALTER TABLE revision
6046
    ADD CONSTRAINT revision_previousrevision_id_fkey FOREIGN KEY (previousrevision_id) REFERENCES revision(revision_id) ON UPDATE CASCADE ON DELETE CASCADE;
6047 689 aaronmk
6048
6049
--
6050 6482 aaronmk
-- Name: soilsample_locationevent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6051 689 aaronmk
--
6052
6053 6482 aaronmk
ALTER TABLE soilsample
6054
    ADD CONSTRAINT soilsample_locationevent_id_fkey FOREIGN KEY (locationevent_id) REFERENCES locationevent(locationevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
6055 689 aaronmk
6056
6057
--
6058 6179 aaronmk
-- Name: soiltaxon_soilparent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6059 689 aaronmk
--
6060
6061 6179 aaronmk
ALTER TABLE soiltaxon
6062
    ADD CONSTRAINT soiltaxon_soilparent_id_fkey FOREIGN KEY (soilparent_id) REFERENCES soiltaxon(soiltaxon_id) ON UPDATE CASCADE ON DELETE CASCADE;
6063 689 aaronmk
6064
6065
--
6066 6302 aaronmk
-- Name: source_matched_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6067
--
6068
6069
ALTER TABLE source
6070
    ADD CONSTRAINT source_matched_source_id_fkey FOREIGN KEY (matched_source_id) REFERENCES source(source_id) ON UPDATE CASCADE ON DELETE CASCADE;
6071
6072
6073
--
6074 6296 aaronmk
-- Name: source_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6075
--
6076
6077
ALTER TABLE source
6078
    ADD CONSTRAINT source_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES source(source_id) ON UPDATE CASCADE ON DELETE CASCADE;
6079
6080
6081
--
6082 6179 aaronmk
-- Name: sourcecontributor_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6083 6178 aaronmk
--
6084
6085 6179 aaronmk
ALTER TABLE sourcecontributor
6086
    ADD CONSTRAINT sourcecontributor_source_id_fkey FOREIGN KEY (source_id) REFERENCES source(source_id) ON UPDATE CASCADE ON DELETE CASCADE;
6087 6178 aaronmk
6088
6089
--
6090 6179 aaronmk
-- Name: sourcecontributor_sourceparty_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6091 689 aaronmk
--
6092
6093 6179 aaronmk
ALTER TABLE sourcecontributor
6094
    ADD CONSTRAINT sourcecontributor_sourceparty_id_fkey FOREIGN KEY (sourceparty_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
6095 689 aaronmk
6096
6097
--
6098 6179 aaronmk
-- Name: sourcename_matched_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6099 689 aaronmk
--
6100
6101 6179 aaronmk
ALTER TABLE sourcename
6102
    ADD CONSTRAINT sourcename_matched_source_id_fkey FOREIGN KEY (matched_source_id) REFERENCES source(source_id) ON UPDATE CASCADE ON DELETE CASCADE;
6103 689 aaronmk
6104
6105
--
6106 6179 aaronmk
-- Name: sourcename_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6107 689 aaronmk
--
6108
6109
6110
6111 6179 aaronmk
6112 689 aaronmk
--
6113 5953 aaronmk
-- Name: specimenreplicate_institution_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6114 689 aaronmk
--
6115
6116
6117
6118 812 aaronmk
6119 689 aaronmk
--
6120 5953 aaronmk
-- Name: specimenreplicate_plantobservation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6121 689 aaronmk
--
6122
6123 5953 aaronmk
ALTER TABLE specimenreplicate
6124
    ADD CONSTRAINT specimenreplicate_plantobservation_id_fkey FOREIGN KEY (plantobservation_id) REFERENCES plantobservation(plantobservation_id) ON UPDATE CASCADE ON DELETE CASCADE;
6125 689 aaronmk
6126
6127
--
6128 6179 aaronmk
-- Name: specimenreplicate_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6129 3222 aaronmk
--
6130
6131
6132
6133 5953 aaronmk
6134 3222 aaronmk
--
6135 3731 aaronmk
-- Name: specimenreplicate_specimen_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6136 689 aaronmk
--
6137
6138
ALTER TABLE specimenreplicate
6139 3731 aaronmk
    ADD CONSTRAINT specimenreplicate_specimen_id_fkey FOREIGN KEY (specimen_id) REFERENCES specimen(specimen_id) ON UPDATE CASCADE ON DELETE CASCADE;
6140 689 aaronmk
6141
6142
--
6143 5953 aaronmk
-- Name: stemobservation_plantobservation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6144 3654 aaronmk
--
6145
6146 5953 aaronmk
ALTER TABLE stemobservation
6147
    ADD CONSTRAINT stemobservation_plantobservation_id_fkey FOREIGN KEY (plantobservation_id) REFERENCES plantobservation(plantobservation_id) ON UPDATE CASCADE ON DELETE CASCADE;
6148 3654 aaronmk
6149
6150
--
6151 6179 aaronmk
-- Name: stemobservation_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6152 689 aaronmk
--
6153
6154
6155
6156 5953 aaronmk
6157 689 aaronmk
--
6158 3731 aaronmk
-- Name: stratum_locationevent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6159 689 aaronmk
--
6160
6161
ALTER TABLE stratum
6162 3731 aaronmk
    ADD CONSTRAINT stratum_locationevent_id_fkey FOREIGN KEY (locationevent_id) REFERENCES locationevent(locationevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
6163 689 aaronmk
6164
6165
--
6166 3731 aaronmk
-- Name: stratum_method_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6167 689 aaronmk
--
6168
6169
6170
6171 3992 aaronmk
6172 689 aaronmk
--
6173 5608 aaronmk
-- Name: taxonalt_taxondetermination_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6174 689 aaronmk
--
6175
6176
ALTER TABLE taxonalt
6177 5608 aaronmk
    ADD CONSTRAINT taxonalt_taxondetermination_id_fkey FOREIGN KEY (taxondetermination_id) REFERENCES taxondetermination(taxondetermination_id) ON UPDATE CASCADE ON DELETE CASCADE;
6178 689 aaronmk
6179
6180
--
6181 5608 aaronmk
-- Name: taxonalt_taxonlabel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6182 689 aaronmk
--
6183
6184
ALTER TABLE taxonalt
6185 5608 aaronmk
    ADD CONSTRAINT taxonalt_taxonlabel_id_fkey FOREIGN KEY (taxonlabel_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
6186 689 aaronmk
6187
6188
--
6189 6483 aaronmk
-- Name: taxonconcept_concept_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6190 5627 aaronmk
--
6191
6192
6193
6194
6195
--
6196
-- Name: taxonconcept_taxonlabel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6197
--
6198
6199
ALTER TABLE taxonconcept
6200
    ADD CONSTRAINT taxonconcept_taxonlabel_id_fkey FOREIGN KEY (taxonlabel_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
6201
6202
6203
--
6204 5608 aaronmk
-- Name: taxoncorrelation_taxonlabel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6205 5464 aaronmk
--
6206
6207
6208
6209 5608 aaronmk
6210 5464 aaronmk
--
6211 5608 aaronmk
-- Name: taxoncorrelation_taxonstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6212 5274 aaronmk
--
6213
6214 5608 aaronmk
ALTER TABLE taxoncorrelation
6215
    ADD CONSTRAINT taxoncorrelation_taxonstatus_id_fkey FOREIGN KEY (taxonstatus_id) REFERENCES taxonstatus(taxonstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
6216 5274 aaronmk
6217
6218
--
6219 5608 aaronmk
-- Name: taxondetermination_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6220 5274 aaronmk
--
6221
6222
6223
6224 5608 aaronmk
6225 5274 aaronmk
--
6226 6179 aaronmk
-- Name: taxondetermination_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6227 689 aaronmk
--
6228
6229
6230
6231 5465 aaronmk
6232 689 aaronmk
--
6233 5657 aaronmk
-- Name: taxondetermination_taxonoccurrence_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6234 689 aaronmk
--
6235
6236 5608 aaronmk
ALTER TABLE taxondetermination
6237 5657 aaronmk
    ADD CONSTRAINT taxondetermination_taxonoccurrence_id_fkey FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE;
6238 689 aaronmk
6239
6240
--
6241 5657 aaronmk
-- Name: taxondetermination_taxonverbatim_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6242 5271 aaronmk
--
6243
6244 5608 aaronmk
ALTER TABLE taxondetermination
6245 5660 aaronmk
    ADD CONSTRAINT taxondetermination_taxonverbatim_id_fkey FOREIGN KEY (taxonverbatim_id) REFERENCES taxonverbatim(taxonverbatim_id) ON UPDATE CASCADE ON DELETE CASCADE;
6246 5271 aaronmk
6247
6248
--
6249 5626 aaronmk
-- Name: taxonlabel_canon_label_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6250 5286 aaronmk
--
6251
6252
6253
6254 5655 aaronmk
6255 5286 aaronmk
--
6256 5609 aaronmk
-- Name: taxonlabel_matched_label_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6257 3654 aaronmk
--
6258
6259 5609 aaronmk
ALTER TABLE taxonlabel
6260
    ADD CONSTRAINT taxonlabel_matched_label_id_fkey FOREIGN KEY (matched_label_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
6261 3654 aaronmk
6262
6263
--
6264 5609 aaronmk
-- Name: taxonlabel_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6265 689 aaronmk
--
6266
6267 5609 aaronmk
ALTER TABLE taxonlabel
6268
    ADD CONSTRAINT taxonlabel_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
6269 689 aaronmk
6270
6271
--
6272 5609 aaronmk
-- Name: taxonlabel_relationship_ancestor_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6273 4941 aaronmk
--
6274
6275 5609 aaronmk
ALTER TABLE taxonlabel_relationship
6276
    ADD CONSTRAINT taxonlabel_relationship_ancestor_id_fkey FOREIGN KEY (ancestor_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
6277 4941 aaronmk
6278
6279
--
6280 5609 aaronmk
-- Name: taxonlabel_relationship_descendant_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6281 5134 aaronmk
--
6282
6283 5609 aaronmk
ALTER TABLE taxonlabel_relationship
6284
    ADD CONSTRAINT taxonlabel_relationship_descendant_id_fkey FOREIGN KEY (descendant_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
6285 5134 aaronmk
6286
6287
--
6288 6179 aaronmk
-- Name: taxonlabel_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6289
--
6290
6291
6292
6293
6294
--
6295 5286 aaronmk
-- Name: taxonlineage_childtaxonstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6296
--
6297
6298
ALTER TABLE taxonlineage
6299
    ADD CONSTRAINT taxonlineage_childtaxonstatus_id_fkey FOREIGN KEY (childtaxonstatus_id) REFERENCES taxonstatus(taxonstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
6300
6301
6302
--
6303
-- Name: taxonlineage_parenttaxonstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6304
--
6305
6306
ALTER TABLE taxonlineage
6307
    ADD CONSTRAINT taxonlineage_parenttaxonstatus_id_fkey FOREIGN KEY (parenttaxonstatus_id) REFERENCES taxonstatus(taxonstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
6308
6309
6310
--
6311 6171 aaronmk
-- Name: taxonoccurrence_collector_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6312
--
6313
6314
6315
6316
6317
--
6318 5953 aaronmk
-- Name: taxonoccurrence_locationevent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6319 4934 aaronmk
--
6320
6321 5953 aaronmk
ALTER TABLE taxonoccurrence
6322
    ADD CONSTRAINT taxonoccurrence_locationevent_id_fkey FOREIGN KEY (locationevent_id) REFERENCES locationevent(locationevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
6323 4934 aaronmk
6324
6325
--
6326 6179 aaronmk
-- Name: taxonoccurrence_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6327 4718 aaronmk
--
6328
6329
6330
6331 5953 aaronmk
6332 4718 aaronmk
--
6333 5286 aaronmk
-- Name: taxonstatus_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6334
--
6335
6336
6337
6338
6339
--
6340 6179 aaronmk
-- Name: taxonstatus_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6341 5286 aaronmk
--
6342
6343
6344
6345
6346
--
6347 5608 aaronmk
-- Name: taxonstatus_taxonlabel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6348 5286 aaronmk
--
6349
6350
ALTER TABLE taxonstatus
6351 5608 aaronmk
    ADD CONSTRAINT taxonstatus_taxonlabel_id_fkey FOREIGN KEY (taxonlabel_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
6352 5286 aaronmk
6353
6354
--
6355 5655 aaronmk
-- Name: taxonverbatim_taxonlabel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6356
--
6357
6358
ALTER TABLE taxonverbatim
6359
    ADD CONSTRAINT taxonverbatim_taxonlabel_id_fkey FOREIGN KEY (taxonlabel_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
6360
6361
6362
--
6363 3731 aaronmk
-- Name: telephone_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6364 689 aaronmk
--
6365
6366
ALTER TABLE telephone
6367 3731 aaronmk
    ADD CONSTRAINT telephone_party_id_fkey FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
6368 689 aaronmk
6369
6370
--
6371 6085 aaronmk
-- Name: threatened_taxonlabel_taxonlabel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6372
--
6373
6374
6375
6376
6377
--
6378 689 aaronmk
-- Name: trait_stemobservation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6379
--
6380
6381
ALTER TABLE trait
6382
    ADD CONSTRAINT trait_stemobservation_id_fkey FOREIGN KEY (stemobservation_id) REFERENCES stemobservation(stemobservation_id) ON UPDATE CASCADE ON DELETE CASCADE;
6383
6384
6385
--
6386 3731 aaronmk
-- Name: voucher_specimenreplicate_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6387 689 aaronmk
--
6388
6389
ALTER TABLE voucher
6390 3934 aaronmk
    ADD CONSTRAINT voucher_specimenreplicate_id_fkey FOREIGN KEY (specimenreplicate_id) REFERENCES specimenreplicate(specimenreplicate_id) ON UPDATE CASCADE ON DELETE CASCADE;
6391 689 aaronmk
6392
6393
--
6394 3731 aaronmk
-- Name: voucher_taxonoccurrence_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6395 689 aaronmk
--
6396
6397
ALTER TABLE voucher
6398 3731 aaronmk
    ADD CONSTRAINT voucher_taxonoccurrence_id_fkey FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE;
6399 689 aaronmk
6400
6401
--
6402 6340 aaronmk
-- Name: public; Type: ACL; Schema: -; Owner: -
6403
--
6404
6405
6406
6407
6408
6409
6410
6411
--
6412 6341 aaronmk
-- Name: place; Type: ACL; Schema: public; Owner: -
6413
--
6414
6415
6416
6417
6418
6419
6420
6421
--
6422
-- Name: taxonlabel; Type: ACL; Schema: public; Owner: -
6423
--
6424
6425
6426
6427
6428
6429
6430
6431
--
6432 6482 aaronmk
-- Name: address; Type: ACL; Schema: public; Owner: -
6433 6341 aaronmk
--
6434
6435
6436
6437
6438
6439
6440
6441
--
6442 6482 aaronmk
-- Name: aggregateoccurrence; Type: ACL; Schema: public; Owner: -
6443 6341 aaronmk
--
6444
6445
6446
6447
6448
6449
6450
6451
--
6452 6482 aaronmk
-- Name: analytical_stem; Type: ACL; Schema: public; Owner: -
6453 6340 aaronmk
--
6454
6455
6456
6457
6458
6459
6460
6461
--
6462 6341 aaronmk
-- Name: analytical_aggregate_view; Type: ACL; Schema: public; Owner: -
6463
--
6464
6465
6466
6467
6468
6469
6470
6471
--
6472
-- Name: coordinates; Type: ACL; Schema: public; Owner: -
6473
--
6474
6475
6476
6477
6478
6479
6480
6481
--
6482 6435 aaronmk
-- Name: cultivated_family_locations; Type: ACL; Schema: public; Owner: -
6483
--
6484
6485
6486
6487
6488
6489
6490
6491
--
6492 6341 aaronmk
-- Name: family_higher_plant_group; Type: ACL; Schema: public; Owner: -
6493
--
6494
6495
6496
6497
6498
6499
6500
6501
--
6502
-- Name: location; Type: ACL; Schema: public; Owner: -
6503
--
6504
6505
6506
6507
6508
6509
6510
6511
--
6512
-- Name: locationevent; Type: ACL; Schema: public; Owner: -
6513
--
6514
6515
6516
6517
6518
6519
6520
6521
--
6522
-- Name: locationplace; Type: ACL; Schema: public; Owner: -
6523
--
6524
6525
6526
6527
6528
6529
6530
6531
--
6532
-- Name: method; Type: ACL; Schema: public; Owner: -
6533
--
6534
6535
6536
6537
6538
6539
6540
6541
--
6542
-- Name: party; Type: ACL; Schema: public; Owner: -
6543
--
6544
6545
6546
6547
6548
6549
6550
6551
--
6552
-- Name: plantobservation; Type: ACL; Schema: public; Owner: -
6553
--
6554
6555
6556
6557
6558
6559
6560
6561
--
6562
-- Name: source; Type: ACL; Schema: public; Owner: -
6563
--
6564
6565
6566
6567
6568
6569
6570
6571
--
6572
-- Name: stemobservation; Type: ACL; Schema: public; Owner: -
6573
--
6574
6575
6576
6577
6578
6579
6580
6581
--
6582
-- Name: taxondetermination; Type: ACL; Schema: public; Owner: -
6583
--
6584
6585
6586
6587
6588
6589
6590
6591
--
6592
-- Name: taxonoccurrence; Type: ACL; Schema: public; Owner: -
6593
--
6594
6595
6596
6597
6598
6599
6600
6601
--
6602
-- Name: taxonverbatim; Type: ACL; Schema: public; Owner: -
6603
--
6604
6605
6606
6607
6608
6609
6610
6611
--
6612
-- Name: threatened_taxonlabel; Type: ACL; Schema: public; Owner: -
6613
--
6614
6615
6616
6617
6618
6619
6620
6621
--
6622
-- Name: analytical_stem_view; Type: ACL; Schema: public; Owner: -
6623
--
6624
6625
6626
6627
6628
6629
6630
6631
--
6632
-- Name: classcontributor; Type: ACL; Schema: public; Owner: -
6633
--
6634
6635
6636
6637
6638
6639
6640
6641
--
6642
-- Name: commclass; Type: ACL; Schema: public; Owner: -
6643
--
6644
6645
6646
6647
6648
6649
6650
6651
--
6652
-- Name: commconcept; Type: ACL; Schema: public; Owner: -
6653
--
6654
6655
6656
6657
6658
6659
6660
6661
--
6662
-- Name: commcorrelation; Type: ACL; Schema: public; Owner: -
6663
--
6664
6665
6666
6667
6668
6669
6670
6671
--
6672
-- Name: commdetermination; Type: ACL; Schema: public; Owner: -
6673
--
6674
6675
6676
6677
6678
6679
6680
6681
--
6682
-- Name: commlineage; Type: ACL; Schema: public; Owner: -
6683
--
6684
6685
6686
6687
6688
6689
6690
6691
--
6692
-- Name: commname; Type: ACL; Schema: public; Owner: -
6693
--
6694
6695
6696
6697
6698
6699
6700
6701
--
6702
-- Name: commstatus; Type: ACL; Schema: public; Owner: -
6703
--
6704
6705
6706
6707
6708
6709
6710
6711
--
6712
-- Name: commusage; Type: ACL; Schema: public; Owner: -
6713
--
6714
6715
6716
6717
6718
6719
6720
6721
--
6722
-- Name: coverindex; Type: ACL; Schema: public; Owner: -
6723
--
6724
6725
6726
6727
6728
6729
6730
6731
--
6732
-- Name: covermethod; Type: ACL; Schema: public; Owner: -
6733
--
6734
6735
6736
6737
6738
6739
6740
6741
--
6742
-- Name: definedvalue; Type: ACL; Schema: public; Owner: -
6743
--
6744
6745
6746
6747
6748
6749
6750
6751
--
6752
-- Name: disturbanceobs; Type: ACL; Schema: public; Owner: -
6753
--
6754
6755
6756
6757
6758
6759
6760
6761
--
6762
-- Name: geoscrub_input; Type: ACL; Schema: public; Owner: -
6763
--
6764
6765
6766
6767
6768
6769
6770
6771
--
6772
-- Name: geoscrub_input_view; Type: ACL; Schema: public; Owner: -
6773
--
6774
6775
6776
6777
6778
6779
6780
6781
--
6782
-- Name: graphic; Type: ACL; Schema: public; Owner: -
6783
--
6784
6785
6786
6787
6788
6789
6790
6791
--
6792
-- Name: higher_plant_group_nodes; Type: ACL; Schema: public; Owner: -
6793
--
6794
6795
6796
6797
6798
6799
6800
6801
--
6802
-- Name: locationeventcontributor; Type: ACL; Schema: public; Owner: -
6803
--
6804
6805
6806
6807
6808
6809
6810
6811
--
6812
-- Name: locationeventsynonym; Type: ACL; Schema: public; Owner: -
6813
--
6814
6815
6816
6817
6818
6819
6820
6821
--
6822
-- Name: methodtaxonclass; Type: ACL; Schema: public; Owner: -
6823
--
6824
6825
6826
6827
6828
6829
6830
6831
--
6832
-- Name: note; Type: ACL; Schema: public; Owner: -
6833
--
6834
6835
6836
6837
6838
6839
6840
6841
--
6842
-- Name: notelink; Type: ACL; Schema: public; Owner: -
6843
--
6844
6845
6846
6847
6848
6849
6850
6851
--
6852
-- Name: partymember; Type: ACL; Schema: public; Owner: -
6853
--
6854
6855
6856
6857
6858
6859
6860
6861
--
6862
-- Name: placecorrelation; Type: ACL; Schema: public; Owner: -
6863
--
6864
6865
6866
6867
6868
6869
6870
6871
--
6872
-- Name: placename; Type: ACL; Schema: public; Owner: -
6873
--
6874
6875
6876
6877
6878
6879
6880
6881
--
6882
-- Name: placename_ancestor; Type: ACL; Schema: public; Owner: -
6883
--
6884
6885
6886
6887
6888
6889
6890
6891
--
6892
-- Name: plant; Type: ACL; Schema: public; Owner: -
6893
--
6894
6895
6896
6897
6898
6899
6900
6901
--
6902
-- Name: project; Type: ACL; Schema: public; Owner: -
6903
--
6904
6905
6906
6907
6908
6909
6910
6911
--
6912
-- Name: projectcontributor; Type: ACL; Schema: public; Owner: -
6913
--
6914
6915
6916
6917
6918
6919
6920
6921
--
6922
-- Name: revision; Type: ACL; Schema: public; Owner: -
6923
--
6924
6925
6926
6927
6928
6929
6930
6931
--
6932 6482 aaronmk
-- Name: soilsample; Type: ACL; Schema: public; Owner: -
6933 6341 aaronmk
--
6934
6935
6936
6937
6938
6939
6940
6941
--
6942
-- Name: soiltaxon; Type: ACL; Schema: public; Owner: -
6943
--
6944
6945
6946
6947
6948
6949
6950
6951
--
6952
-- Name: sourcecontributor; Type: ACL; Schema: public; Owner: -
6953
--
6954
6955
6956
6957
6958
6959
6960
6961
--
6962
-- Name: sourcename; Type: ACL; Schema: public; Owner: -
6963
--
6964
6965
6966
6967
6968
6969
6970
6971
--
6972
-- Name: specimen; Type: ACL; Schema: public; Owner: -
6973
--
6974
6975
6976
6977
6978
6979
6980
6981
--
6982
-- Name: specimenreplicate; Type: ACL; Schema: public; Owner: -
6983
--
6984
6985
6986
6987
6988
6989
6990
6991
--
6992
-- Name: stratum; Type: ACL; Schema: public; Owner: -
6993
--
6994
6995
6996
6997
6998
6999
7000
7001
--
7002
-- Name: taxonalt; Type: ACL; Schema: public; Owner: -
7003
--
7004
7005
7006
7007
7008
7009
7010
7011
--
7012
-- Name: taxonconcept; Type: ACL; Schema: public; Owner: -
7013
--
7014
7015
7016
7017
7018
7019
7020
7021
--
7022
-- Name: taxoncorrelation; Type: ACL; Schema: public; Owner: -
7023
--
7024
7025
7026
7027
7028
7029
7030
7031
--
7032
-- Name: taxonlabel_relationship; Type: ACL; Schema: public; Owner: -
7033
--
7034
7035
7036
7037
7038
7039
7040
7041
--
7042
-- Name: taxonlineage; Type: ACL; Schema: public; Owner: -
7043
--
7044
7045
7046
7047
7048
7049
7050
7051
--
7052
-- Name: taxonstatus; Type: ACL; Schema: public; Owner: -
7053
--
7054
7055
7056
7057
7058
7059
7060
7061
--
7062
-- Name: telephone; Type: ACL; Schema: public; Owner: -
7063
--
7064
7065
7066
7067
7068
7069
7070
7071
--
7072
-- Name: threatened_taxonlabel_view; Type: ACL; Schema: public; Owner: -
7073
--
7074
7075
7076
7077
7078
7079
7080
7081
--
7082
-- Name: tnrs_input_name; Type: ACL; Schema: public; Owner: -
7083
--
7084
7085
7086
7087
7088
7089
7090
7091
--
7092
-- Name: trait; Type: ACL; Schema: public; Owner: -
7093
--
7094
7095
7096
7097
7098
7099
7100
7101
--
7102
-- Name: userdefined; Type: ACL; Schema: public; Owner: -
7103
--
7104
7105
7106
7107
7108
7109
7110
7111
--
7112
-- Name: voucher; Type: ACL; Schema: public; Owner: -
7113
--
7114
7115
7116
7117
7118
7119
7120
7121
--
7122 689 aaronmk
-- PostgreSQL database dump complete
7123
--