Revision 8941
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/VegCore/VegCore.ERD.mwb.run | ||
---|---|---|
8 | 8 |
VegCore.my.sql/make () |
9 | 9 |
{ |
10 | 10 |
echo_func; set_make_vars |
11 |
database=VegCore mysqldump_local >"$target" |
|
11 |
database=VegCore mysqldump_local --skip-add-drop-table >"$target"
|
|
12 | 12 |
} |
13 | 13 |
|
14 | 14 |
export_mysql () |
schemas/VegCore/VegCore.my.sql | ||
---|---|---|
14 | 14 |
-- Table structure for table "aggregate_observation" |
15 | 15 |
-- |
16 | 16 |
|
17 |
DROP TABLE IF EXISTS "aggregate_observation"; |
|
18 | 17 |
CREATE TABLE "aggregate_observation" ( |
19 | 18 |
"id" varbinary(767) NOT NULL, |
20 | 19 |
"taxon_concept" varbinary(767) NOT NULL, |
... | ... | |
36 | 35 |
-- Table structure for table "base_class" |
37 | 36 |
-- |
38 | 37 |
|
39 |
DROP TABLE IF EXISTS "base_class"; |
|
40 | 38 |
CREATE TABLE "base_class" ( |
41 | 39 |
"id" varbinary(767) NOT NULL, |
42 | 40 |
"referenced_class" varbinary(767) NOT NULL, |
... | ... | |
57 | 55 |
-- Table structure for table "collection" |
58 | 56 |
-- |
59 | 57 |
|
60 |
DROP TABLE IF EXISTS "collection"; |
|
61 | 58 |
CREATE TABLE "collection" ( |
62 | 59 |
"id" varbinary(767) NOT NULL, |
63 | 60 |
"institution" varbinary(767) NOT NULL, |
... | ... | |
81 | 78 |
-- Table structure for table "community" |
82 | 79 |
-- |
83 | 80 |
|
84 |
DROP TABLE IF EXISTS "community"; |
|
85 | 81 |
CREATE TABLE "community" ( |
86 | 82 |
"id" varbinary(767) NOT NULL, |
87 | 83 |
"name" varbinary(767) NOT NULL, |
... | ... | |
101 | 97 |
-- Table structure for table "coordinates" |
102 | 98 |
-- |
103 | 99 |
|
104 |
DROP TABLE IF EXISTS "coordinates"; |
|
105 | 100 |
CREATE TABLE "coordinates" ( |
106 | 101 |
"id" varbinary(767) NOT NULL, |
107 | 102 |
"latitude_deg" varbinary(767) DEFAULT NULL, |
... | ... | |
120 | 115 |
-- Table structure for table "derived_class" |
121 | 116 |
-- |
122 | 117 |
|
123 |
DROP TABLE IF EXISTS "derived_class"; |
|
124 | 118 |
CREATE TABLE "derived_class" ( |
125 | 119 |
"id" varbinary(767) NOT NULL, |
126 | 120 |
PRIMARY KEY ("id"), |
... | ... | |
138 | 132 |
-- Table structure for table "event" |
139 | 133 |
-- |
140 | 134 |
|
141 |
DROP TABLE IF EXISTS "event"; |
|
142 | 135 |
CREATE TABLE "event" ( |
143 | 136 |
"id" varbinary(767) NOT NULL, |
144 | 137 |
"parent" varbinary(767) NOT NULL, |
... | ... | |
167 | 160 |
-- Table structure for table "event_participant" |
168 | 161 |
-- |
169 | 162 |
|
170 |
DROP TABLE IF EXISTS "event_participant"; |
|
171 | 163 |
CREATE TABLE "event_participant" ( |
172 | 164 |
"event" varbinary(767) NOT NULL, |
173 | 165 |
"party" varbinary(767) NOT NULL, |
... | ... | |
190 | 182 |
-- Table structure for table "geological_context" |
191 | 183 |
-- |
192 | 184 |
|
193 |
DROP TABLE IF EXISTS "geological_context"; |
|
194 | 185 |
CREATE TABLE "geological_context" ( |
195 | 186 |
"id" varbinary(767) NOT NULL, |
196 | 187 |
"name" varbinary(767) NOT NULL, |
... | ... | |
210 | 201 |
-- Table structure for table "geovalidation" |
211 | 202 |
-- |
212 | 203 |
|
213 |
DROP TABLE IF EXISTS "geovalidation"; |
|
214 | 204 |
CREATE TABLE "geovalidation" ( |
215 | 205 |
"id" varbinary(767) NOT NULL, |
216 | 206 |
"geovalid" tinyint(1) NOT NULL, |
... | ... | |
231 | 221 |
-- Table structure for table "individual" |
232 | 222 |
-- |
233 | 223 |
|
234 |
DROP TABLE IF EXISTS "individual"; |
|
235 | 224 |
CREATE TABLE "individual" ( |
236 | 225 |
"id" varbinary(767) NOT NULL, |
237 | 226 |
"tag" varbinary(767) DEFAULT NULL, |
... | ... | |
250 | 239 |
-- Table structure for table "individual_observation" |
251 | 240 |
-- |
252 | 241 |
|
253 |
DROP TABLE IF EXISTS "individual_observation"; |
|
254 | 242 |
CREATE TABLE "individual_observation" ( |
255 | 243 |
"id" varbinary(767) NOT NULL, |
256 | 244 |
"individual" varbinary(767) DEFAULT NULL, |
... | ... | |
273 | 261 |
-- Table structure for table "method" |
274 | 262 |
-- |
275 | 263 |
|
276 |
DROP TABLE IF EXISTS "method"; |
|
277 | 264 |
CREATE TABLE "method" ( |
278 | 265 |
"id" varbinary(767) NOT NULL, |
279 | 266 |
"parent" varbinary(767) NOT NULL, |
... | ... | |
295 | 282 |
-- Table structure for table "organization" |
296 | 283 |
-- |
297 | 284 |
|
298 |
DROP TABLE IF EXISTS "organization"; |
|
299 | 285 |
CREATE TABLE "organization" ( |
300 | 286 |
"id" varbinary(767) NOT NULL, |
301 | 287 |
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
... | ... | |
314 | 300 |
-- Table structure for table "parsed_taxon_assertion" |
315 | 301 |
-- |
316 | 302 |
|
317 |
DROP TABLE IF EXISTS "parsed_taxon_assertion"; |
|
318 | 303 |
CREATE TABLE "parsed_taxon_assertion" ( |
319 | 304 |
"id" varbinary(767) NOT NULL, |
320 | 305 |
"matched_taxon_concept" varbinary(767) DEFAULT NULL, |
... | ... | |
337 | 322 |
-- Table structure for table "party" |
338 | 323 |
-- |
339 | 324 |
|
340 |
DROP TABLE IF EXISTS "party"; |
|
341 | 325 |
CREATE TABLE "party" ( |
342 | 326 |
"id" varbinary(767) NOT NULL, |
343 | 327 |
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
... | ... | |
356 | 340 |
-- Table structure for table "place" |
357 | 341 |
-- |
358 | 342 |
|
359 |
DROP TABLE IF EXISTS "place"; |
|
360 | 343 |
CREATE TABLE "place" ( |
361 | 344 |
"id" varbinary(767) NOT NULL, |
362 | 345 |
"parent" varbinary(767) NOT NULL, |
... | ... | |
384 | 367 |
-- Table structure for table "place_observation" |
385 | 368 |
-- |
386 | 369 |
|
387 |
DROP TABLE IF EXISTS "place_observation"; |
|
388 | 370 |
CREATE TABLE "place_observation" ( |
389 | 371 |
"id" varbinary(767) NOT NULL, |
390 | 372 |
"place" varbinary(767) NOT NULL, |
... | ... | |
416 | 398 |
-- Table structure for table "place_path" |
417 | 399 |
-- |
418 | 400 |
|
419 |
DROP TABLE IF EXISTS "place_path"; |
|
420 | 401 |
CREATE TABLE "place_path" ( |
421 | 402 |
"id" varbinary(767) NOT NULL, |
422 | 403 |
"continent" varbinary(767) DEFAULT NULL, |
... | ... | |
439 | 420 |
-- Table structure for table "plot" |
440 | 421 |
-- |
441 | 422 |
|
442 |
DROP TABLE IF EXISTS "plot"; |
|
443 | 423 |
CREATE TABLE "plot" ( |
444 | 424 |
"id" varbinary(767) NOT NULL, |
445 | 425 |
"name" varbinary(767) DEFAULT NULL, |
... | ... | |
460 | 440 |
-- Table structure for table "project" |
461 | 441 |
-- |
462 | 442 |
|
463 |
DROP TABLE IF EXISTS "project"; |
|
464 | 443 |
CREATE TABLE "project" ( |
465 | 444 |
"id" varbinary(767) NOT NULL, |
466 | 445 |
"name" varbinary(767) NOT NULL, |
... | ... | |
480 | 459 |
-- Table structure for table "record" |
481 | 460 |
-- |
482 | 461 |
|
483 |
DROP TABLE IF EXISTS "record"; |
|
484 | 462 |
CREATE TABLE "record" ( |
485 | 463 |
"id" varbinary(767) NOT NULL, |
486 | 464 |
"source" varbinary(767) NOT NULL, |
... | ... | |
504 | 482 |
-- Table structure for table "referenced_class" |
505 | 483 |
-- |
506 | 484 |
|
507 |
DROP TABLE IF EXISTS "referenced_class"; |
|
508 | 485 |
CREATE TABLE "referenced_class" ( |
509 | 486 |
"id" varbinary(767) NOT NULL, |
510 | 487 |
PRIMARY KEY ("id"), |
... | ... | |
522 | 499 |
-- Table structure for table "relationship" |
523 | 500 |
-- |
524 | 501 |
|
525 |
DROP TABLE IF EXISTS "relationship"; |
|
526 | 502 |
CREATE TABLE "relationship" ( |
527 | 503 |
"id" varbinary(767) NOT NULL, |
528 | 504 |
"record" varbinary(767) NOT NULL, |
... | ... | |
547 | 523 |
-- Table structure for table "soil_observation" |
548 | 524 |
-- |
549 | 525 |
|
550 |
DROP TABLE IF EXISTS "soil_observation"; |
|
551 | 526 |
CREATE TABLE "soil_observation" ( |
552 | 527 |
"id" varbinary(767) NOT NULL, |
553 | 528 |
"observations" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
... | ... | |
566 | 541 |
-- Table structure for table "source" |
567 | 542 |
-- |
568 | 543 |
|
569 |
DROP TABLE IF EXISTS "source"; |
|
570 | 544 |
CREATE TABLE "source" ( |
571 | 545 |
"id" varbinary(767) NOT NULL, |
572 | 546 |
"parent" varbinary(767) NOT NULL, |
... | ... | |
595 | 569 |
-- Table structure for table "specimen" |
596 | 570 |
-- |
597 | 571 |
|
598 |
DROP TABLE IF EXISTS "specimen"; |
|
599 | 572 |
CREATE TABLE "specimen" ( |
600 | 573 |
"id" varbinary(767) NOT NULL, |
601 | 574 |
"individual" varbinary(767) DEFAULT NULL, |
... | ... | |
635 | 608 |
-- Table structure for table "specimen_observation" |
636 | 609 |
-- |
637 | 610 |
|
638 |
DROP TABLE IF EXISTS "specimen_observation"; |
|
639 | 611 |
CREATE TABLE "specimen_observation" ( |
640 | 612 |
"id" varbinary(767) NOT NULL, |
641 | 613 |
"specimen" varbinary(767) NOT NULL, |
... | ... | |
657 | 629 |
-- Table structure for table "stem" |
658 | 630 |
-- |
659 | 631 |
|
660 |
DROP TABLE IF EXISTS "stem"; |
|
661 | 632 |
CREATE TABLE "stem" ( |
662 | 633 |
"id" varbinary(767) NOT NULL, |
663 | 634 |
"individual" varbinary(767) NOT NULL, |
... | ... | |
678 | 649 |
-- Table structure for table "stem_observation" |
679 | 650 |
-- |
680 | 651 |
|
681 |
DROP TABLE IF EXISTS "stem_observation"; |
|
682 | 652 |
CREATE TABLE "stem_observation" ( |
683 | 653 |
"id" varbinary(767) NOT NULL, |
684 | 654 |
"individual_observation" varbinary(767) NOT NULL, |
... | ... | |
704 | 674 |
-- Table structure for table "stratum" |
705 | 675 |
-- |
706 | 676 |
|
707 |
DROP TABLE IF EXISTS "stratum"; |
|
708 | 677 |
CREATE TABLE "stratum" ( |
709 | 678 |
"id" varbinary(767) NOT NULL, |
710 | 679 |
"name" varbinary(767) NOT NULL, |
... | ... | |
724 | 693 |
-- Table structure for table "subplot" |
725 | 694 |
-- |
726 | 695 |
|
727 |
DROP TABLE IF EXISTS "subplot"; |
|
728 | 696 |
CREATE TABLE "subplot" ( |
729 | 697 |
"id" varbinary(767) NOT NULL, |
730 | 698 |
"x_m" double DEFAULT NULL, |
... | ... | |
744 | 712 |
-- Table structure for table "taxon_assertion" |
745 | 713 |
-- |
746 | 714 |
|
747 |
DROP TABLE IF EXISTS "taxon_assertion"; |
|
748 | 715 |
CREATE TABLE "taxon_assertion" ( |
749 | 716 |
"id" varbinary(767) NOT NULL, |
750 | 717 |
"string" varbinary(767) NOT NULL, |
... | ... | |
770 | 737 |
-- Table structure for table "taxon_concept" |
771 | 738 |
-- |
772 | 739 |
|
773 |
DROP TABLE IF EXISTS "taxon_concept"; |
|
774 | 740 |
CREATE TABLE "taxon_concept" ( |
775 | 741 |
"id" varbinary(767) NOT NULL, |
776 | 742 |
"according_to" varbinary(767) NOT NULL, |
... | ... | |
798 | 764 |
-- Table structure for table "taxon_determination" |
799 | 765 |
-- |
800 | 766 |
|
801 |
DROP TABLE IF EXISTS "taxon_determination"; |
|
802 | 767 |
CREATE TABLE "taxon_determination" ( |
803 | 768 |
"id" varbinary(767) NOT NULL, |
804 | 769 |
"taxon_assertion" varbinary(767) NOT NULL, |
... | ... | |
824 | 789 |
-- Table structure for table "taxon_name" |
825 | 790 |
-- |
826 | 791 |
|
827 |
DROP TABLE IF EXISTS "taxon_name"; |
|
828 | 792 |
CREATE TABLE "taxon_name" ( |
829 | 793 |
"id" varbinary(767) NOT NULL, |
830 | 794 |
"unique_name" varbinary(767) NOT NULL, |
... | ... | |
850 | 814 |
-- Table structure for table "taxon_observation" |
851 | 815 |
-- |
852 | 816 |
|
853 |
DROP TABLE IF EXISTS "taxon_observation"; |
|
854 | 817 |
CREATE TABLE "taxon_observation" ( |
855 | 818 |
"id" varbinary(767) NOT NULL, |
856 | 819 |
"taxon_occurrence" varbinary(767) NOT NULL, |
... | ... | |
881 | 844 |
-- Table structure for table "taxon_occurrence" |
882 | 845 |
-- |
883 | 846 |
|
884 |
DROP TABLE IF EXISTS "taxon_occurrence"; |
|
885 | 847 |
CREATE TABLE "taxon_occurrence" ( |
886 | 848 |
"id" varbinary(767) NOT NULL, |
887 | 849 |
"current_determination" varbinary(767) DEFAULT NULL, |
... | ... | |
905 | 867 |
-- Table structure for table "taxon_path" |
906 | 868 |
-- |
907 | 869 |
|
908 |
DROP TABLE IF EXISTS "taxon_path"; |
|
909 | 870 |
CREATE TABLE "taxon_path" ( |
910 | 871 |
"id" varbinary(767) NOT NULL, |
911 | 872 |
"family" varbinary(767) DEFAULT NULL, |
... | ... | |
927 | 888 |
-- Table structure for table "taxon_presence" |
928 | 889 |
-- |
929 | 890 |
|
930 |
DROP TABLE IF EXISTS "taxon_presence"; |
|
931 | 891 |
CREATE TABLE "taxon_presence" ( |
932 | 892 |
"id" varbinary(767) NOT NULL, |
933 | 893 |
"taxon_concept" varbinary(767) NOT NULL, |
... | ... | |
949 | 909 |
-- Table structure for table "taxon_string" |
950 | 910 |
-- |
951 | 911 |
|
952 |
DROP TABLE IF EXISTS "taxon_string"; |
|
953 | 912 |
CREATE TABLE "taxon_string" ( |
954 | 913 |
"string" varbinary(767) NOT NULL, |
955 | 914 |
"parsed_taxon_assertion" varbinary(767) DEFAULT NULL, |
... | ... | |
969 | 928 |
-- Table structure for table "validatable_place" |
970 | 929 |
-- |
971 | 930 |
|
972 |
DROP TABLE IF EXISTS "validatable_place"; |
|
973 | 931 |
CREATE TABLE "validatable_place" ( |
974 | 932 |
"id" varbinary(767) NOT NULL, |
975 | 933 |
"coordinates" varbinary(767) NOT NULL, |
schemas/VegCore/VegCore.pg.sql | ||
---|---|---|
16 | 16 |
-- Table structure for table "aggregate_observation" |
17 | 17 |
-- |
18 | 18 |
|
19 |
DROP TABLE IF EXISTS "aggregate_observation"; |
|
20 | 19 |
CREATE TABLE "aggregate_observation" ( |
21 | 20 |
"id" bytea NOT NULL, |
22 | 21 |
"taxon_concept" bytea NOT NULL, |
... | ... | |
38 | 37 |
-- Table structure for table "base_class" |
39 | 38 |
-- |
40 | 39 |
|
41 |
DROP TABLE IF EXISTS "base_class"; |
|
42 | 40 |
CREATE TABLE "base_class" ( |
43 | 41 |
"id" bytea NOT NULL, |
44 | 42 |
"referenced_class" bytea NOT NULL, |
... | ... | |
59 | 57 |
-- Table structure for table "collection" |
60 | 58 |
-- |
61 | 59 |
|
62 |
DROP TABLE IF EXISTS "collection"; |
|
63 | 60 |
CREATE TABLE "collection" ( |
64 | 61 |
"id" bytea NOT NULL, |
65 | 62 |
"institution" bytea NOT NULL, |
... | ... | |
83 | 80 |
-- Table structure for table "community" |
84 | 81 |
-- |
85 | 82 |
|
86 |
DROP TABLE IF EXISTS "community"; |
|
87 | 83 |
CREATE TABLE "community" ( |
88 | 84 |
"id" bytea NOT NULL, |
89 | 85 |
"name" bytea NOT NULL, |
... | ... | |
103 | 99 |
-- Table structure for table "coordinates" |
104 | 100 |
-- |
105 | 101 |
|
106 |
DROP TABLE IF EXISTS "coordinates"; |
|
107 | 102 |
CREATE TABLE "coordinates" ( |
108 | 103 |
"id" bytea NOT NULL, |
109 | 104 |
"latitude_deg" bytea DEFAULT NULL, |
... | ... | |
122 | 117 |
-- Table structure for table "derived_class" |
123 | 118 |
-- |
124 | 119 |
|
125 |
DROP TABLE IF EXISTS "derived_class"; |
|
126 | 120 |
CREATE TABLE "derived_class" ( |
127 | 121 |
"id" bytea NOT NULL, |
128 | 122 |
PRIMARY KEY ("id"), |
... | ... | |
140 | 134 |
-- Table structure for table "event" |
141 | 135 |
-- |
142 | 136 |
|
143 |
DROP TABLE IF EXISTS "event"; |
|
144 | 137 |
CREATE TABLE "event" ( |
145 | 138 |
"id" bytea NOT NULL, |
146 | 139 |
"parent" bytea NOT NULL, |
... | ... | |
169 | 162 |
-- Table structure for table "event_participant" |
170 | 163 |
-- |
171 | 164 |
|
172 |
DROP TABLE IF EXISTS "event_participant"; |
|
173 | 165 |
CREATE TABLE "event_participant" ( |
174 | 166 |
"event" bytea NOT NULL, |
175 | 167 |
"party" bytea NOT NULL, |
... | ... | |
192 | 184 |
-- Table structure for table "geological_context" |
193 | 185 |
-- |
194 | 186 |
|
195 |
DROP TABLE IF EXISTS "geological_context"; |
|
196 | 187 |
CREATE TABLE "geological_context" ( |
197 | 188 |
"id" bytea NOT NULL, |
198 | 189 |
"name" bytea NOT NULL, |
... | ... | |
212 | 203 |
-- Table structure for table "geovalidation" |
213 | 204 |
-- |
214 | 205 |
|
215 |
DROP TABLE IF EXISTS "geovalidation"; |
|
216 | 206 |
CREATE TABLE "geovalidation" ( |
217 | 207 |
"id" bytea NOT NULL, |
218 | 208 |
"geovalid" integer NOT NULL, |
... | ... | |
233 | 223 |
-- Table structure for table "individual" |
234 | 224 |
-- |
235 | 225 |
|
236 |
DROP TABLE IF EXISTS "individual"; |
|
237 | 226 |
CREATE TABLE "individual" ( |
238 | 227 |
"id" bytea NOT NULL, |
239 | 228 |
"tag" bytea DEFAULT NULL, |
... | ... | |
252 | 241 |
-- Table structure for table "individual_observation" |
253 | 242 |
-- |
254 | 243 |
|
255 |
DROP TABLE IF EXISTS "individual_observation"; |
|
256 | 244 |
CREATE TABLE "individual_observation" ( |
257 | 245 |
"id" bytea NOT NULL, |
258 | 246 |
"individual" bytea DEFAULT NULL, |
... | ... | |
275 | 263 |
-- Table structure for table "method" |
276 | 264 |
-- |
277 | 265 |
|
278 |
DROP TABLE IF EXISTS "method"; |
|
279 | 266 |
CREATE TABLE "method" ( |
280 | 267 |
"id" bytea NOT NULL, |
281 | 268 |
"parent" bytea NOT NULL, |
... | ... | |
297 | 284 |
-- Table structure for table "organization" |
298 | 285 |
-- |
299 | 286 |
|
300 |
DROP TABLE IF EXISTS "organization"; |
|
301 | 287 |
CREATE TABLE "organization" ( |
302 | 288 |
"id" bytea NOT NULL, |
303 | 289 |
"info" hstore DEFAULT NULL, |
... | ... | |
316 | 302 |
-- Table structure for table "parsed_taxon_assertion" |
317 | 303 |
-- |
318 | 304 |
|
319 |
DROP TABLE IF EXISTS "parsed_taxon_assertion"; |
|
320 | 305 |
CREATE TABLE "parsed_taxon_assertion" ( |
321 | 306 |
"id" bytea NOT NULL, |
322 | 307 |
"matched_taxon_concept" bytea DEFAULT NULL, |
... | ... | |
339 | 324 |
-- Table structure for table "party" |
340 | 325 |
-- |
341 | 326 |
|
342 |
DROP TABLE IF EXISTS "party"; |
|
343 | 327 |
CREATE TABLE "party" ( |
344 | 328 |
"id" bytea NOT NULL, |
345 | 329 |
"info" hstore DEFAULT NULL, |
... | ... | |
358 | 342 |
-- Table structure for table "place" |
359 | 343 |
-- |
360 | 344 |
|
361 |
DROP TABLE IF EXISTS "place"; |
|
362 | 345 |
CREATE TABLE "place" ( |
363 | 346 |
"id" bytea NOT NULL, |
364 | 347 |
"parent" bytea NOT NULL, |
... | ... | |
386 | 369 |
-- Table structure for table "place_observation" |
387 | 370 |
-- |
388 | 371 |
|
389 |
DROP TABLE IF EXISTS "place_observation"; |
|
390 | 372 |
CREATE TABLE "place_observation" ( |
391 | 373 |
"id" bytea NOT NULL, |
392 | 374 |
"place" bytea NOT NULL, |
... | ... | |
418 | 400 |
-- Table structure for table "place_path" |
419 | 401 |
-- |
420 | 402 |
|
421 |
DROP TABLE IF EXISTS "place_path"; |
|
422 | 403 |
CREATE TABLE "place_path" ( |
423 | 404 |
"id" bytea NOT NULL, |
424 | 405 |
"continent" bytea DEFAULT NULL, |
... | ... | |
441 | 422 |
-- Table structure for table "plot" |
442 | 423 |
-- |
443 | 424 |
|
444 |
DROP TABLE IF EXISTS "plot"; |
|
445 | 425 |
CREATE TABLE "plot" ( |
446 | 426 |
"id" bytea NOT NULL, |
447 | 427 |
"name" bytea DEFAULT NULL, |
... | ... | |
462 | 442 |
-- Table structure for table "project" |
463 | 443 |
-- |
464 | 444 |
|
465 |
DROP TABLE IF EXISTS "project"; |
|
466 | 445 |
CREATE TABLE "project" ( |
467 | 446 |
"id" bytea NOT NULL, |
468 | 447 |
"name" bytea NOT NULL, |
... | ... | |
482 | 461 |
-- Table structure for table "record" |
483 | 462 |
-- |
484 | 463 |
|
485 |
DROP TABLE IF EXISTS "record"; |
|
486 | 464 |
CREATE TABLE "record" ( |
487 | 465 |
"id" bytea NOT NULL, |
488 | 466 |
"source" bytea NOT NULL, |
... | ... | |
506 | 484 |
-- Table structure for table "referenced_class" |
507 | 485 |
-- |
508 | 486 |
|
509 |
DROP TABLE IF EXISTS "referenced_class"; |
|
510 | 487 |
CREATE TABLE "referenced_class" ( |
511 | 488 |
"id" bytea NOT NULL, |
512 | 489 |
PRIMARY KEY ("id"), |
... | ... | |
524 | 501 |
-- Table structure for table "relationship" |
525 | 502 |
-- |
526 | 503 |
|
527 |
DROP TABLE IF EXISTS "relationship"; |
|
528 | 504 |
CREATE TABLE "relationship" ( |
529 | 505 |
"id" bytea NOT NULL, |
530 | 506 |
"record" bytea NOT NULL, |
... | ... | |
549 | 525 |
-- Table structure for table "soil_observation" |
550 | 526 |
-- |
551 | 527 |
|
552 |
DROP TABLE IF EXISTS "soil_observation"; |
|
553 | 528 |
CREATE TABLE "soil_observation" ( |
554 | 529 |
"id" bytea NOT NULL, |
555 | 530 |
"observations" hstore DEFAULT NULL, |
... | ... | |
568 | 543 |
-- Table structure for table "source" |
569 | 544 |
-- |
570 | 545 |
|
571 |
DROP TABLE IF EXISTS "source"; |
|
572 | 546 |
CREATE TABLE "source" ( |
573 | 547 |
"id" bytea NOT NULL, |
574 | 548 |
"parent" bytea NOT NULL, |
... | ... | |
597 | 571 |
-- Table structure for table "specimen" |
598 | 572 |
-- |
599 | 573 |
|
600 |
DROP TABLE IF EXISTS "specimen"; |
|
601 | 574 |
CREATE TABLE "specimen" ( |
602 | 575 |
"id" bytea NOT NULL, |
603 | 576 |
"individual" bytea DEFAULT NULL, |
... | ... | |
637 | 610 |
-- Table structure for table "specimen_observation" |
638 | 611 |
-- |
639 | 612 |
|
640 |
DROP TABLE IF EXISTS "specimen_observation"; |
|
641 | 613 |
CREATE TABLE "specimen_observation" ( |
642 | 614 |
"id" bytea NOT NULL, |
643 | 615 |
"specimen" bytea NOT NULL, |
... | ... | |
659 | 631 |
-- Table structure for table "stem" |
660 | 632 |
-- |
661 | 633 |
|
662 |
DROP TABLE IF EXISTS "stem"; |
|
663 | 634 |
CREATE TABLE "stem" ( |
664 | 635 |
"id" bytea NOT NULL, |
665 | 636 |
"individual" bytea NOT NULL, |
... | ... | |
680 | 651 |
-- Table structure for table "stem_observation" |
681 | 652 |
-- |
682 | 653 |
|
683 |
DROP TABLE IF EXISTS "stem_observation"; |
|
684 | 654 |
CREATE TABLE "stem_observation" ( |
685 | 655 |
"id" bytea NOT NULL, |
686 | 656 |
"individual_observation" bytea NOT NULL, |
... | ... | |
706 | 676 |
-- Table structure for table "stratum" |
707 | 677 |
-- |
708 | 678 |
|
709 |
DROP TABLE IF EXISTS "stratum"; |
|
710 | 679 |
CREATE TABLE "stratum" ( |
711 | 680 |
"id" bytea NOT NULL, |
712 | 681 |
"name" bytea NOT NULL, |
... | ... | |
726 | 695 |
-- Table structure for table "subplot" |
727 | 696 |
-- |
728 | 697 |
|
729 |
DROP TABLE IF EXISTS "subplot"; |
|
730 | 698 |
CREATE TABLE "subplot" ( |
731 | 699 |
"id" bytea NOT NULL, |
732 | 700 |
"x_m" double precision DEFAULT NULL, |
... | ... | |
746 | 714 |
-- Table structure for table "taxon_assertion" |
747 | 715 |
-- |
748 | 716 |
|
749 |
DROP TABLE IF EXISTS "taxon_assertion"; |
|
750 | 717 |
CREATE TABLE "taxon_assertion" ( |
751 | 718 |
"id" bytea NOT NULL, |
752 | 719 |
"string" bytea NOT NULL, |
... | ... | |
772 | 739 |
-- Table structure for table "taxon_concept" |
773 | 740 |
-- |
774 | 741 |
|
775 |
DROP TABLE IF EXISTS "taxon_concept"; |
|
776 | 742 |
CREATE TABLE "taxon_concept" ( |
777 | 743 |
"id" bytea NOT NULL, |
778 | 744 |
"according_to" bytea NOT NULL, |
... | ... | |
800 | 766 |
-- Table structure for table "taxon_determination" |
801 | 767 |
-- |
802 | 768 |
|
803 |
DROP TABLE IF EXISTS "taxon_determination"; |
|
804 | 769 |
CREATE TABLE "taxon_determination" ( |
805 | 770 |
"id" bytea NOT NULL, |
806 | 771 |
"taxon_assertion" bytea NOT NULL, |
... | ... | |
826 | 791 |
-- Table structure for table "taxon_name" |
827 | 792 |
-- |
828 | 793 |
|
829 |
DROP TABLE IF EXISTS "taxon_name"; |
|
830 | 794 |
CREATE TABLE "taxon_name" ( |
831 | 795 |
"id" bytea NOT NULL, |
832 | 796 |
"unique_name" bytea NOT NULL, |
... | ... | |
852 | 816 |
-- Table structure for table "taxon_observation" |
853 | 817 |
-- |
854 | 818 |
|
855 |
DROP TABLE IF EXISTS "taxon_observation"; |
|
856 | 819 |
CREATE TABLE "taxon_observation" ( |
857 | 820 |
"id" bytea NOT NULL, |
858 | 821 |
"taxon_occurrence" bytea NOT NULL, |
... | ... | |
883 | 846 |
-- Table structure for table "taxon_occurrence" |
884 | 847 |
-- |
885 | 848 |
|
886 |
DROP TABLE IF EXISTS "taxon_occurrence"; |
|
887 | 849 |
CREATE TABLE "taxon_occurrence" ( |
888 | 850 |
"id" bytea NOT NULL, |
889 | 851 |
"current_determination" bytea DEFAULT NULL, |
... | ... | |
907 | 869 |
-- Table structure for table "taxon_path" |
908 | 870 |
-- |
909 | 871 |
|
910 |
DROP TABLE IF EXISTS "taxon_path"; |
|
911 | 872 |
CREATE TABLE "taxon_path" ( |
912 | 873 |
"id" bytea NOT NULL, |
913 | 874 |
"family" bytea DEFAULT NULL, |
... | ... | |
929 | 890 |
-- Table structure for table "taxon_presence" |
930 | 891 |
-- |
931 | 892 |
|
932 |
DROP TABLE IF EXISTS "taxon_presence"; |
|
933 | 893 |
CREATE TABLE "taxon_presence" ( |
934 | 894 |
"id" bytea NOT NULL, |
935 | 895 |
"taxon_concept" bytea NOT NULL, |
... | ... | |
951 | 911 |
-- Table structure for table "taxon_string" |
952 | 912 |
-- |
953 | 913 |
|
954 |
DROP TABLE IF EXISTS "taxon_string"; |
|
955 | 914 |
CREATE TABLE "taxon_string" ( |
956 | 915 |
"string" bytea NOT NULL, |
957 | 916 |
"parsed_taxon_assertion" bytea DEFAULT NULL, |
... | ... | |
971 | 930 |
-- Table structure for table "validatable_place" |
972 | 931 |
-- |
973 | 932 |
|
974 |
DROP TABLE IF EXISTS "validatable_place"; |
|
975 | 933 |
CREATE TABLE "validatable_place" ( |
976 | 934 |
"id" bytea NOT NULL, |
977 | 935 |
"coordinates" bytea NOT NULL, |
Also available in: Unified diff
schemas/VegCore/VegCore.ERD.mwb.run: VegCore.my.sql/make (): leave out the DROP TABLE statements for now using --skip-add-drop-table