Project

General

Profile

« Previous | Next » 

Revision 381

Regenerate vegbien.sql by dumping the vegbien db

View differences:

Makefile
116 116
#####
117 117

  
118 118
db: _not_file
119
	-echo "CREATE DATABASE vegbien OWNER bien ENCODING 'UTF8';"|$(psqlAsAdmin)
119
	-$(dbCreateCmd)
120 120
	$(psqlAsBien) <mappings/schemas/vegbien.sql
121 121
# ignore errors if database exists
122
dbCreateCmd = echo "CREATE DATABASE vegbien OWNER bien ENCODING 'UTF8' \
123
TEMPLATE template1;"|$(psqlAsAdmin)
122 124

  
123 125
rm_db: _not_file
124 126
	echo "DROP DATABASE IF EXISTS vegbien;"|$(psqlAsAdmin)
mappings/schemas/vegbien_empty.sql
1 1
TRUNCATE address CASCADE;
2 2
TRUNCATE aux_role CASCADE;
3 3
TRUNCATE classcontributor CASCADE;
4
TRUNCATE collectiveobservation CASCADE;
4 5
TRUNCATE commclass CASCADE;
5 6
TRUNCATE commconcept CASCADE;
6 7
TRUNCATE commcorrelation CASCADE;
......
27 28
TRUNCATE disturbanceobs CASCADE;
28 29
TRUNCATE embargo CASCADE;
29 30
TRUNCATE graphic CASCADE;
31
TRUNCATE individualplant CASCADE;
30 32
TRUNCATE keywords CASCADE;
31 33
TRUNCATE keywords_extra CASCADE;
32 34
TRUNCATE namedplace CASCADE;
......
57 59
TRUNCATE soilobs CASCADE;
58 60
TRUNCATE soiltaxon CASCADE;
59 61
TRUNCATE stemcount CASCADE;
60
TRUNCATE individualplant CASCADE;
61 62
TRUNCATE stratum CASCADE;
62 63
TRUNCATE stratummethod CASCADE;
63 64
TRUNCATE stratumtype CASCADE;
64 65
TRUNCATE taxonalt CASCADE;
65
TRUNCATE collectiveobservation CASCADE;
66
TRUNCATE taxonbin CASCADE;
66 67
TRUNCATE taxondetermination CASCADE;
67 68
TRUNCATE taxonoccurrence CASCADE;
68 69
TRUNCATE telephone CASCADE;
......
79 80
TRUNCATE userrecordowner CASCADE;
80 81
TRUNCATE userregionalexp CASCADE;
81 82
TRUNCATE usr CASCADE;
82
TRUNCATE taxonbin CASCADE;
mappings/schemas/vegbien.sql
53 53
CREATE SEQUENCE address_address_id_seq
54 54
    START WITH 1
55 55
    INCREMENT BY 1
56
    NO MINVALUE
56 57
    NO MAXVALUE
57
    NO MINVALUE
58 58
    CACHE 1;
59 59

  
60 60

  
......
88 88
CREATE SEQUENCE aux_role_role_id_seq
89 89
    START WITH 1
90 90
    INCREMENT BY 1
91
    NO MINVALUE
91 92
    NO MAXVALUE
92
    NO MINVALUE
93 93
    CACHE 1;
94 94

  
95 95

  
......
120 120
CREATE SEQUENCE classcontributor_classcontributor_id_seq
121 121
    START WITH 1
122 122
    INCREMENT BY 1
123
    NO MINVALUE
123 124
    NO MAXVALUE
124
    NO MINVALUE
125 125
    CACHE 1;
126 126

  
127 127

  
......
133 133

  
134 134

  
135 135
--
136
-- Name: collectiveobservation; Type: TABLE; Schema: public; Owner: -; Tablespace: 
137
--
138

  
139
CREATE TABLE collectiveobservation (
140
    collectiveobservation_id integer NOT NULL,
141
    taxonoccurrence_id integer NOT NULL,
142
    stratum_id integer,
143
    cover double precision,
144
    basalarea double precision,
145
    biomass double precision,
146
    inferencearea double precision,
147
    stratumbase double precision,
148
    stratumheight double precision,
149
    emb_taxonimportance integer,
150
    covercode character varying(10)
151
);
152

  
153

  
154
--
136 155
-- Name: commclass; Type: TABLE; Schema: public; Owner: -; Tablespace: 
137 156
--
138 157

  
......
163 182
CREATE SEQUENCE commclass_commclass_id_seq
164 183
    START WITH 1
165 184
    INCREMENT BY 1
185
    NO MINVALUE
166 186
    NO MAXVALUE
167
    NO MINVALUE
168 187
    CACHE 1;
169 188

  
170 189

  
......
198 217
CREATE SEQUENCE commconcept_commconcept_id_seq
199 218
    START WITH 1
200 219
    INCREMENT BY 1
220
    NO MINVALUE
201 221
    NO MAXVALUE
202
    NO MINVALUE
203 222
    CACHE 1;
204 223

  
205 224

  
......
231 250
CREATE SEQUENCE commcorrelation_commcorrelation_id_seq
232 251
    START WITH 1
233 252
    INCREMENT BY 1
253
    NO MINVALUE
234 254
    NO MAXVALUE
235
    NO MINVALUE
236 255
    CACHE 1;
237 256

  
238 257

  
......
270 289
CREATE SEQUENCE comminterpretation_comminterpretation_id_seq
271 290
    START WITH 1
272 291
    INCREMENT BY 1
292
    NO MINVALUE
273 293
    NO MAXVALUE
274
    NO MINVALUE
275 294
    CACHE 1;
276 295

  
277 296

  
......
300 319
CREATE SEQUENCE commlineage_commlineage_id_seq
301 320
    START WITH 1
302 321
    INCREMENT BY 1
322
    NO MINVALUE
303 323
    NO MAXVALUE
304
    NO MINVALUE
305 324
    CACHE 1;
306 325

  
307 326

  
......
331 350
CREATE SEQUENCE commname_commname_id_seq
332 351
    START WITH 1
333 352
    INCREMENT BY 1
353
    NO MINVALUE
334 354
    NO MAXVALUE
335
    NO MINVALUE
336 355
    CACHE 1;
337 356

  
338 357

  
......
369 388
CREATE SEQUENCE commstatus_commstatus_id_seq
370 389
    START WITH 1
371 390
    INCREMENT BY 1
391
    NO MINVALUE
372 392
    NO MAXVALUE
373
    NO MINVALUE
374 393
    CACHE 1;
375 394

  
376 395

  
......
406 425
CREATE SEQUENCE commusage_commusage_id_seq
407 426
    START WITH 1
408 427
    INCREMENT BY 1
428
    NO MINVALUE
409 429
    NO MAXVALUE
410
    NO MINVALUE
411 430
    CACHE 1;
412 431

  
413 432

  
......
440 459
CREATE SEQUENCE coverindex_coverindex_id_seq
441 460
    START WITH 1
442 461
    INCREMENT BY 1
462
    NO MINVALUE
443 463
    NO MAXVALUE
444
    NO MINVALUE
445 464
    CACHE 1;
446 465

  
447 466

  
......
472 491
CREATE SEQUENCE covermethod_covermethod_id_seq
473 492
    START WITH 1
474 493
    INCREMENT BY 1
494
    NO MINVALUE
475 495
    NO MAXVALUE
476
    NO MINVALUE
477 496
    CACHE 1;
478 497

  
479 498

  
......
520 539
CREATE SEQUENCE dba_cookie_cookie_id_seq
521 540
    START WITH 1
522 541
    INCREMENT BY 1
542
    NO MINVALUE
523 543
    NO MAXVALUE
524
    NO MINVALUE
525 544
    CACHE 1;
526 545

  
527 546

  
......
550 569
CREATE SEQUENCE dba_cookielabels_cookielabel_id_seq
551 570
    START WITH 1
552 571
    INCREMENT BY 1
572
    NO MINVALUE
553 573
    NO MAXVALUE
554
    NO MINVALUE
555 574
    CACHE 1;
556 575

  
557 576

  
......
593 612
CREATE SEQUENCE dba_datacache_dba_datacache_id_seq
594 613
    START WITH 1
595 614
    INCREMENT BY 1
615
    NO MINVALUE
596 616
    NO MAXVALUE
597
    NO MINVALUE
598 617
    CACHE 1;
599 618

  
600 619

  
......
623 642
CREATE SEQUENCE dba_datamodelversion_dba_datamodelversion_id_seq
624 643
    START WITH 1
625 644
    INCREMENT BY 1
645
    NO MINVALUE
626 646
    NO MAXVALUE
627
    NO MINVALUE
628 647
    CACHE 1;
629 648

  
630 649

  
......
660 679
CREATE SEQUENCE dba_dbstatstime_stat_id_seq
661 680
    START WITH 1
662 681
    INCREMENT BY 1
682
    NO MINVALUE
663 683
    NO MAXVALUE
664
    NO MINVALUE
665 684
    CACHE 1;
666 685

  
667 686

  
......
702 721
CREATE SEQUENCE dba_fielddescription_dba_fielddescription_id_seq
703 722
    START WITH 1
704 723
    INCREMENT BY 1
724
    NO MINVALUE
705 725
    NO MAXVALUE
706
    NO MINVALUE
707 726
    CACHE 1;
708 727

  
709 728

  
......
735 754
CREATE SEQUENCE dba_fieldlist_dba_fieldlist_id_seq
736 755
    START WITH 1
737 756
    INCREMENT BY 1
757
    NO MINVALUE
738 758
    NO MAXVALUE
739
    NO MINVALUE
740 759
    CACHE 1;
741 760

  
742 761

  
......
763 782
CREATE SEQUENCE dba_onerow_dba_onerow_id_seq
764 783
    START WITH 1
765 784
    INCREMENT BY 1
785
    NO MINVALUE
766 786
    NO MAXVALUE
767
    NO MINVALUE
768 787
    CACHE 1;
769 788

  
770 789

  
......
797 816
CREATE SEQUENCE dba_preassignacccode_dba_preassignacccode_id_seq
798 817
    START WITH 1
799 818
    INCREMENT BY 1
819
    NO MINVALUE
800 820
    NO MAXVALUE
801
    NO MINVALUE
802 821
    CACHE 1;
803 822

  
804 823

  
......
816 835
CREATE SEQUENCE dba_preassignacccode_dba_requestnumber_seq
817 836
    START WITH 1
818 837
    INCREMENT BY 1
838
    NO MINVALUE
819 839
    NO MAXVALUE
820
    NO MINVALUE
821 840
    CACHE 1;
822 841

  
823 842

  
......
842 861
CREATE SEQUENCE dba_tabledescription_dba_tabledescription_id_seq
843 862
    START WITH 1
844 863
    INCREMENT BY 1
864
    NO MINVALUE
845 865
    NO MAXVALUE
846
    NO MINVALUE
847 866
    CACHE 1;
848 867

  
849 868

  
......
885 904
CREATE SEQUENCE definedvalue_definedvalue_id_seq
886 905
    START WITH 1
887 906
    INCREMENT BY 1
907
    NO MINVALUE
888 908
    NO MAXVALUE
889
    NO MINVALUE
890 909
    CACHE 1;
891 910

  
892 911

  
......
920 939
CREATE SEQUENCE disturbanceobs_disturbanceobs_id_seq
921 940
    START WITH 1
922 941
    INCREMENT BY 1
942
    NO MINVALUE
923 943
    NO MAXVALUE
924
    NO MINVALUE
925 944
    CACHE 1;
926 945

  
927 946

  
......
953 972
CREATE SEQUENCE embargo_embargo_id_seq
954 973
    START WITH 1
955 974
    INCREMENT BY 1
975
    NO MINVALUE
956 976
    NO MAXVALUE
957
    NO MINVALUE
958 977
    CACHE 1;
959 978

  
960 979

  
......
989 1008
CREATE SEQUENCE graphic_graphic_id_seq
990 1009
    START WITH 1
991 1010
    INCREMENT BY 1
1011
    NO MINVALUE
992 1012
    NO MAXVALUE
993
    NO MINVALUE
994 1013
    CACHE 1;
995 1014

  
996 1015

  
......
1002 1021

  
1003 1022

  
1004 1023
--
1024
-- Name: individualplant; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1025
--
1026

  
1027
CREATE TABLE individualplant (
1028
    individualplant_id integer NOT NULL,
1029
    stemcount_id integer NOT NULL,
1030
    stemcode character varying(20),
1031
    stemxposition double precision,
1032
    stemyposition double precision,
1033
    stemhealth character varying(50),
1034
    emb_stemlocation integer
1035
);
1036

  
1037

  
1038
--
1005 1039
-- Name: keywords; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1006 1040
--
1007 1041

  
......
1047 1081
CREATE SEQUENCE namedplace_namedplace_id_seq
1048 1082
    START WITH 1
1049 1083
    INCREMENT BY 1
1084
    NO MINVALUE
1050 1085
    NO MAXVALUE
1051
    NO MINVALUE
1052 1086
    CACHE 1;
1053 1087

  
1054 1088

  
......
1078 1112
CREATE SEQUENCE namedplacecorrelation_namedplacecorrelation_id_seq
1079 1113
    START WITH 1
1080 1114
    INCREMENT BY 1
1115
    NO MINVALUE
1081 1116
    NO MAXVALUE
1082
    NO MINVALUE
1083 1117
    CACHE 1;
1084 1118

  
1085 1119

  
......
1113 1147
CREATE SEQUENCE note_note_id_seq
1114 1148
    START WITH 1
1115 1149
    INCREMENT BY 1
1150
    NO MINVALUE
1116 1151
    NO MAXVALUE
1117
    NO MINVALUE
1118 1152
    CACHE 1;
1119 1153

  
1120 1154

  
......
1144 1178
CREATE SEQUENCE notelink_notelink_id_seq
1145 1179
    START WITH 1
1146 1180
    INCREMENT BY 1
1181
    NO MINVALUE
1147 1182
    NO MAXVALUE
1148
    NO MINVALUE
1149 1183
    CACHE 1;
1150 1184

  
1151 1185

  
......
1269 1303
CREATE SEQUENCE observation_observation_id_seq
1270 1304
    START WITH 1
1271 1305
    INCREMENT BY 1
1306
    NO MINVALUE
1272 1307
    NO MAXVALUE
1273
    NO MINVALUE
1274 1308
    CACHE 1;
1275 1309

  
1276 1310

  
......
1301 1335
CREATE SEQUENCE observationcontributor_observationcontributor_id_seq
1302 1336
    START WITH 1
1303 1337
    INCREMENT BY 1
1338
    NO MINVALUE
1304 1339
    NO MAXVALUE
1305
    NO MINVALUE
1306 1340
    CACHE 1;
1307 1341

  
1308 1342

  
......
1337 1371
CREATE SEQUENCE observationsynonym_observationsynonym_id_seq
1338 1372
    START WITH 1
1339 1373
    INCREMENT BY 1
1374
    NO MINVALUE
1340 1375
    NO MAXVALUE
1341
    NO MINVALUE
1342 1376
    CACHE 1;
1343 1377

  
1344 1378

  
......
1377 1411
CREATE SEQUENCE party_party_id_seq
1378 1412
    START WITH 1
1379 1413
    INCREMENT BY 1
1414
    NO MINVALUE
1380 1415
    NO MAXVALUE
1381
    NO MINVALUE
1382 1416
    CACHE 1;
1383 1417

  
1384 1418

  
......
1410 1444
CREATE SEQUENCE partymember_partymember_id_seq
1411 1445
    START WITH 1
1412 1446
    INCREMENT BY 1
1447
    NO MINVALUE
1413 1448
    NO MAXVALUE
1414
    NO MINVALUE
1415 1449
    CACHE 1;
1416 1450

  
1417 1451

  
......
1441 1475
CREATE SEQUENCE place_plotplace_id_seq
1442 1476
    START WITH 1
1443 1477
    INCREMENT BY 1
1478
    NO MINVALUE
1444 1479
    NO MAXVALUE
1445
    NO MINVALUE
1446 1480
    CACHE 1;
1447 1481

  
1448 1482

  
......
1477 1511
CREATE SEQUENCE plantconcept_plantconcept_id_seq
1478 1512
    START WITH 1
1479 1513
    INCREMENT BY 1
1514
    NO MINVALUE
1480 1515
    NO MAXVALUE
1481
    NO MINVALUE
1482 1516
    CACHE 1;
1483 1517

  
1484 1518

  
......
1510 1544
CREATE SEQUENCE plantcorrelation_plantcorrelation_id_seq
1511 1545
    START WITH 1
1512 1546
    INCREMENT BY 1
1547
    NO MINVALUE
1513 1548
    NO MAXVALUE
1514
    NO MINVALUE
1515 1549
    CACHE 1;
1516 1550

  
1517 1551

  
......
1540 1574
CREATE SEQUENCE plantlineage_plantlineage_id_seq
1541 1575
    START WITH 1
1542 1576
    INCREMENT BY 1
1577
    NO MINVALUE
1543 1578
    NO MAXVALUE
1544
    NO MINVALUE
1545 1579
    CACHE 1;
1546 1580

  
1547 1581

  
......
1571 1605
CREATE SEQUENCE plantname_plantname_id_seq
1572 1606
    START WITH 1
1573 1607
    INCREMENT BY 1
1608
    NO MINVALUE
1574 1609
    NO MAXVALUE
1575
    NO MINVALUE
1576 1610
    CACHE 1;
1577 1611

  
1578 1612

  
......
1611 1645
CREATE SEQUENCE plantstatus_plantstatus_id_seq
1612 1646
    START WITH 1
1613 1647
    INCREMENT BY 1
1648
    NO MINVALUE
1614 1649
    NO MAXVALUE
1615
    NO MINVALUE
1616 1650
    CACHE 1;
1617 1651

  
1618 1652

  
......
1649 1683
CREATE SEQUENCE plantusage_plantusage_id_seq
1650 1684
    START WITH 1
1651 1685
    INCREMENT BY 1
1686
    NO MINVALUE
1652 1687
    NO MAXVALUE
1653
    NO MINVALUE
1654 1688
    CACHE 1;
1655 1689

  
1656 1690

  
......
1726 1760
CREATE SEQUENCE plot_plot_id_seq
1727 1761
    START WITH 1
1728 1762
    INCREMENT BY 1
1763
    NO MINVALUE
1729 1764
    NO MAXVALUE
1730
    NO MINVALUE
1731 1765
    CACHE 1;
1732 1766

  
1733 1767

  
......
1761 1795
CREATE SEQUENCE project_project_id_seq
1762 1796
    START WITH 1
1763 1797
    INCREMENT BY 1
1798
    NO MINVALUE
1764 1799
    NO MAXVALUE
1765
    NO MINVALUE
1766 1800
    CACHE 1;
1767 1801

  
1768 1802

  
......
1794 1828
CREATE SEQUENCE projectcontributor_projectcontributor_id_seq
1795 1829
    START WITH 1
1796 1830
    INCREMENT BY 1
1831
    NO MINVALUE
1797 1832
    NO MAXVALUE
1798
    NO MINVALUE
1799 1833
    CACHE 1;
1800 1834

  
1801 1835

  
......
1848 1882
CREATE SEQUENCE reference_reference_id_seq
1849 1883
    START WITH 1
1850 1884
    INCREMENT BY 1
1885
    NO MINVALUE
1851 1886
    NO MAXVALUE
1852
    NO MINVALUE
1853 1887
    CACHE 1;
1854 1888

  
1855 1889

  
......
1879 1913
CREATE SEQUENCE referencealtident_referencealtident_id_seq
1880 1914
    START WITH 1
1881 1915
    INCREMENT BY 1
1916
    NO MINVALUE
1882 1917
    NO MAXVALUE
1883
    NO MINVALUE
1884 1918
    CACHE 1;
1885 1919

  
1886 1920

  
......
1911 1945
CREATE SEQUENCE referencecontributor_referencecontributor_id_seq
1912 1946
    START WITH 1
1913 1947
    INCREMENT BY 1
1948
    NO MINVALUE
1914 1949
    NO MAXVALUE
1915
    NO MINVALUE
1916 1950
    CACHE 1;
1917 1951

  
1918 1952

  
......
1943 1977
CREATE SEQUENCE referencejournal_referencejournal_id_seq
1944 1978
    START WITH 1
1945 1979
    INCREMENT BY 1
1980
    NO MINVALUE
1946 1981
    NO MAXVALUE
1947
    NO MINVALUE
1948 1982
    CACHE 1;
1949 1983

  
1950 1984

  
......
1980 2014
CREATE SEQUENCE referenceparty_referenceparty_id_seq
1981 2015
    START WITH 1
1982 2016
    INCREMENT BY 1
2017
    NO MINVALUE
1983 2018
    NO MAXVALUE
1984
    NO MINVALUE
1985 2019
    CACHE 1;
1986 2020

  
1987 2021

  
......
2015 2049
CREATE SEQUENCE revision_revision_id_seq
2016 2050
    START WITH 1
2017 2051
    INCREMENT BY 1
2052
    NO MINVALUE
2018 2053
    NO MAXVALUE
2019
    NO MINVALUE
2020 2054
    CACHE 1;
2021 2055

  
2022 2056

  
......
2059 2093
CREATE SEQUENCE soilobs_soilobs_id_seq
2060 2094
    START WITH 1
2061 2095
    INCREMENT BY 1
2096
    NO MINVALUE
2062 2097
    NO MAXVALUE
2063
    NO MINVALUE
2064 2098
    CACHE 1;
2065 2099

  
2066 2100

  
......
2093 2127
CREATE SEQUENCE soiltaxon_soiltaxon_id_seq
2094 2128
    START WITH 1
2095 2129
    INCREMENT BY 1
2130
    NO MINVALUE
2096 2131
    NO MAXVALUE
2097
    NO MINVALUE
2098 2132
    CACHE 1;
2099 2133

  
2100 2134

  
......
2129 2163
CREATE SEQUENCE stemcount_stemcount_id_seq
2130 2164
    START WITH 1
2131 2165
    INCREMENT BY 1
2166
    NO MINVALUE
2132 2167
    NO MAXVALUE
2133
    NO MINVALUE
2134 2168
    CACHE 1;
2135 2169

  
2136 2170

  
......
2142 2176

  
2143 2177

  
2144 2178
--
2145
-- Name: individualplant; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2146
--
2147

  
2148
CREATE TABLE individualplant (
2149
    individualplant_id integer NOT NULL,
2150
    stemcount_id integer NOT NULL,
2151
    stemcode character varying(20),
2152
    stemxposition double precision,
2153
    stemyposition double precision,
2154
    stemhealth character varying(50),
2155
    emb_stemlocation integer
2156
);
2157

  
2158

  
2159
--
2160 2179
-- Name: stemlocation_stemlocation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2161 2180
--
2162 2181

  
2163 2182
CREATE SEQUENCE stemlocation_stemlocation_id_seq
2164 2183
    START WITH 1
2165 2184
    INCREMENT BY 1
2185
    NO MINVALUE
2166 2186
    NO MAXVALUE
2167
    NO MINVALUE
2168 2187
    CACHE 1;
2169 2188

  
2170 2189

  
......
2199 2218
CREATE SEQUENCE stratum_stratum_id_seq
2200 2219
    START WITH 1
2201 2220
    INCREMENT BY 1
2221
    NO MINVALUE
2202 2222
    NO MAXVALUE
2203
    NO MINVALUE
2204 2223
    CACHE 1;
2205 2224

  
2206 2225

  
......
2232 2251
CREATE SEQUENCE stratummethod_stratummethod_id_seq
2233 2252
    START WITH 1
2234 2253
    INCREMENT BY 1
2254
    NO MINVALUE
2235 2255
    NO MAXVALUE
2236
    NO MINVALUE
2237 2256
    CACHE 1;
2238 2257

  
2239 2258

  
......
2264 2283
CREATE SEQUENCE stratumtype_stratumtype_id_seq
2265 2284
    START WITH 1
2266 2285
    INCREMENT BY 1
2286
    NO MINVALUE
2267 2287
    NO MAXVALUE
2268
    NO MINVALUE
2269 2288
    CACHE 1;
2270 2289

  
2271 2290

  
......
2298 2317
CREATE SEQUENCE taxonalt_taxonalt_id_seq
2299 2318
    START WITH 1
2300 2319
    INCREMENT BY 1
2320
    NO MINVALUE
2301 2321
    NO MAXVALUE
2302
    NO MINVALUE
2303 2322
    CACHE 1;
2304 2323

  
2305 2324

  
......
2311 2330

  
2312 2331

  
2313 2332
--
2314
-- Name: collectiveobservation; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2333
-- Name: taxonbin; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2315 2334
--
2316 2335

  
2317
CREATE TABLE collectiveobservation (
2318
    collectiveobservation_id integer NOT NULL,
2319
    taxonoccurrence_id integer NOT NULL,
2336
CREATE TABLE taxonbin (
2337
    taxonbin_id integer NOT NULL,
2338
    label character varying(255) NOT NULL,
2320 2339
    stratum_id integer,
2321
    cover double precision,
2322
    basalarea double precision,
2323
    biomass double precision,
2324
    inferencearea double precision,
2325
    stratumbase double precision,
2326
    stratumheight double precision,
2327
    emb_taxonimportance integer,
2328
    covercode character varying(10)
2340
    sizeclass_id integer,
2341
    coverindex_id integer
2329 2342
);
2330 2343

  
2331 2344

  
2332 2345
--
2333
-- Name: taxonimportance_taxonimportance_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2334
--
2335

  
2336
CREATE SEQUENCE taxonimportance_taxonimportance_id_seq
2337
    START WITH 1
2338
    INCREMENT BY 1
2339
    NO MAXVALUE
2340
    NO MINVALUE
2341
    CACHE 1;
2342

  
2343

  
2344
--
2345
-- Name: taxonimportance_taxonimportance_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2346
--
2347

  
2348
ALTER SEQUENCE taxonimportance_taxonimportance_id_seq OWNED BY collectiveobservation.collectiveobservation_id;
2349

  
2350

  
2351
--
2352 2346
-- Name: taxondetermination; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2353 2347
--
2354 2348

  
......
2383 2377

  
2384 2378

  
2385 2379
--
2380
-- Name: taxonimportance_taxonimportance_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2381
--
2382

  
2383
CREATE SEQUENCE taxonimportance_taxonimportance_id_seq
2384
    START WITH 1
2385
    INCREMENT BY 1
2386
    NO MINVALUE
2387
    NO MAXVALUE
2388
    CACHE 1;
2389

  
2390

  
2391
--
2392
-- Name: taxonimportance_taxonimportance_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2393
--
2394

  
2395
ALTER SEQUENCE taxonimportance_taxonimportance_id_seq OWNED BY collectiveobservation.collectiveobservation_id;
2396

  
2397

  
2398
--
2386 2399
-- Name: taxoninterpretation_taxoninterpretation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2387 2400
--
2388 2401

  
2389 2402
CREATE SEQUENCE taxoninterpretation_taxoninterpretation_id_seq
2390 2403
    START WITH 1
2391 2404
    INCREMENT BY 1
2405
    NO MINVALUE
2392 2406
    NO MAXVALUE
2393
    NO MINVALUE
2394 2407
    CACHE 1;
2395 2408

  
2396 2409

  
......
2433 2446
CREATE SEQUENCE taxonobservation_taxonobservation_id_seq
2434 2447
    START WITH 1
2435 2448
    INCREMENT BY 1
2449
    NO MINVALUE
2436 2450
    NO MAXVALUE
2437
    NO MINVALUE
2438 2451
    CACHE 1;
2439 2452

  
2440 2453

  
......
2464 2477
CREATE SEQUENCE telephone_telephone_id_seq
2465 2478
    START WITH 1
2466 2479
    INCREMENT BY 1
2480
    NO MINVALUE
2467 2481
    NO MAXVALUE
2468
    NO MINVALUE
2469 2482
    CACHE 1;
2470 2483

  
2471 2484

  
......
2496 2509
CREATE SEQUENCE temptbl_std_commnames_commconcept_id_seq
2497 2510
    START WITH 1
2498 2511
    INCREMENT BY 1
2512
    NO MINVALUE
2499 2513
    NO MAXVALUE
2500
    NO MINVALUE
2501 2514
    CACHE 1;
2502 2515

  
2503 2516

  
......
2529 2542
CREATE SEQUENCE temptbl_std_plantnames_plantconcept_id_seq
2530 2543
    START WITH 1
2531 2544
    INCREMENT BY 1
2545
    NO MINVALUE
2532 2546
    NO MAXVALUE
2533
    NO MINVALUE
2534 2547
    CACHE 1;
2535 2548

  
2536 2549

  
......
2594 2607
CREATE SEQUENCE usercertification_usercertification_id_seq
2595 2608
    START WITH 1
2596 2609
    INCREMENT BY 1
2610
    NO MINVALUE
2597 2611
    NO MAXVALUE
2598
    NO MINVALUE
2599 2612
    CACHE 1;
2600 2613

  
2601 2614

  
......
2631 2644
CREATE SEQUENCE userdataset_userdataset_id_seq
2632 2645
    START WITH 1
2633 2646
    INCREMENT BY 1
2647
    NO MINVALUE
2634 2648
    NO MAXVALUE
2635
    NO MINVALUE
2636 2649
    CACHE 1;
2637 2650

  
2638 2651

  
......
2669 2682
CREATE SEQUENCE userdatasetitem_userdatasetitem_id_seq
2670 2683
    START WITH 1
2671 2684
    INCREMENT BY 1
2685
    NO MINVALUE
2672 2686
    NO MAXVALUE
2673
    NO MINVALUE
2674 2687
    CACHE 1;
2675 2688

  
2676 2689

  
......
2703 2716
CREATE SEQUENCE userdefined_userdefined_id_seq
2704 2717
    START WITH 1
2705 2718
    INCREMENT BY 1
2719
    NO MINVALUE
2706 2720
    NO MAXVALUE
2707
    NO MINVALUE
2708 2721
    CACHE 1;
2709 2722

  
2710 2723

  
......
2738 2751
CREATE SEQUENCE usernotify_usernotify_id_seq
2739 2752
    START WITH 1
2740 2753
    INCREMENT BY 1
2754
    NO MINVALUE
2741 2755
    NO MAXVALUE
2742
    NO MINVALUE
2743 2756
    CACHE 1;
2744 2757

  
2745 2758

  
......
2772 2785
CREATE SEQUENCE userpermission_userpermission_id_seq
2773 2786
    START WITH 1
2774 2787
    INCREMENT BY 1
2788
    NO MINVALUE
2775 2789
    NO MAXVALUE
2776
    NO MINVALUE
2777 2790
    CACHE 1;
2778 2791

  
2779 2792

  
......
2806 2819
CREATE SEQUENCE userpreference_userpreference_id_seq
2807 2820
    START WITH 1
2808 2821
    INCREMENT BY 1
2822
    NO MINVALUE
2809 2823
    NO MAXVALUE
2810
    NO MINVALUE
2811 2824
    CACHE 1;
2812 2825

  
2813 2826

  
......
2844 2857
CREATE SEQUENCE userquery_userquery_id_seq
2845 2858
    START WITH 1
2846 2859
    INCREMENT BY 1
2860
    NO MINVALUE
2847 2861
    NO MAXVALUE
2848
    NO MINVALUE
2849 2862
    CACHE 1;
2850 2863

  
2851 2864

  
......
2879 2892
CREATE SEQUENCE userrecordowner_userrecordowner_id_seq
2880 2893
    START WITH 1
2881 2894
    INCREMENT BY 1
2895
    NO MINVALUE
2882 2896
    NO MAXVALUE
2883
    NO MINVALUE
2884 2897
    CACHE 1;
2885 2898

  
2886 2899

  
......
2912 2925
CREATE SEQUENCE userregionalexp_userregionalexp_id_seq
2913 2926
    START WITH 1
2914 2927
    INCREMENT BY 1
2928
    NO MINVALUE
2915 2929
    NO MAXVALUE
2916
    NO MINVALUE
2917 2930
    CACHE 1;
2918 2931

  
2919 2932

  
......
2949 2962
CREATE SEQUENCE usr_usr_id_seq
2950 2963
    START WITH 1
2951 2964
    INCREMENT BY 1
2965
    NO MINVALUE
2952 2966
    NO MAXVALUE
2953
    NO MINVALUE
2954 2967
    CACHE 1;
2955 2968

  
2956 2969

  
......
3487 3500

  
3488 3501

  
3489 3502
--
3503
-- Name: collectiveobservation_id; Type: DEFAULT; Schema: public; Owner: -
3504
--
3505

  
3506
ALTER TABLE collectiveobservation ALTER COLUMN collectiveobservation_id SET DEFAULT nextval('taxonimportance_taxonimportance_id_seq'::regclass);
3507

  
3508

  
3509
--
3490 3510
-- Name: commclass_id; Type: DEFAULT; Schema: public; Owner: -
3491 3511
--
3492 3512

  
......
3655 3675

  
3656 3676

  
3657 3677
--
3678
-- Name: individualplant_id; Type: DEFAULT; Schema: public; Owner: -
3679
--
3680

  
3681
ALTER TABLE individualplant ALTER COLUMN individualplant_id SET DEFAULT nextval('stemlocation_stemlocation_id_seq'::regclass);
3682

  
3683

  
3684
--
3658 3685
-- Name: namedplace_id; Type: DEFAULT; Schema: public; Owner: -
3659 3686
--
3660 3687

  
......
3683 3710

  
3684 3711

  
3685 3712
--
3686
-- Name: plotevent_id; Type: DEFAULT; Schema: public; Owner: -
3687
--
3688

  
3689
ALTER TABLE plotevent ALTER COLUMN plotevent_id SET DEFAULT nextval('observation_observation_id_seq'::regclass);
3690

  
3691

  
3692
--
3693 3713
-- Name: observationcontributor_id; Type: DEFAULT; Schema: public; Owner: -
3694 3714
--
3695 3715

  
......
3774 3794

  
3775 3795

  
3776 3796
--
3797
-- Name: plotevent_id; Type: DEFAULT; Schema: public; Owner: -
3798
--
3799

  
3800
ALTER TABLE plotevent ALTER COLUMN plotevent_id SET DEFAULT nextval('observation_observation_id_seq'::regclass);
3801

  
3802

  
3803
--
3777 3804
-- Name: project_id; Type: DEFAULT; Schema: public; Owner: -
3778 3805
--
3779 3806

  
......
3851 3878

  
3852 3879

  
3853 3880
--
3854
-- Name: individualplant_id; Type: DEFAULT; Schema: public; Owner: -
3855
--
3856

  
3857
ALTER TABLE individualplant ALTER COLUMN individualplant_id SET DEFAULT nextval('stemlocation_stemlocation_id_seq'::regclass);
3858

  
3859

  
3860
--
3861 3881
-- Name: stratum_id; Type: DEFAULT; Schema: public; Owner: -
3862 3882
--
3863 3883

  
......
3886 3906

  
3887 3907

  
3888 3908
--
3889
-- Name: collectiveobservation_id; Type: DEFAULT; Schema: public; Owner: -
3890
--
3891

  
3892
ALTER TABLE collectiveobservation ALTER COLUMN collectiveobservation_id SET DEFAULT nextval('taxonimportance_taxonimportance_id_seq'::regclass);
3893

  
3894

  
3895
--
3896 3909
-- Name: taxondetermination_id; Type: DEFAULT; Schema: public; Owner: -
3897 3910
--
3898 3911

  
......
6767 6780
-- PostgreSQL database dump complete
6768 6781
--
6769 6782

  
6770
CREATE TABLE taxonbin (
6771
    taxonbin_id integer NOT NULL,
6772
    label character varying(255) NOT NULL,
6773
    stratum_id integer,
6774
    sizeclass_id integer,
6775
    coverindex_id integer
6776
);
mappings/Makefile
45 45
	$(bin)/cat_csv <$+ >$@
46 46
.PRECIOUS: VegBank-VegBIEN.%.csv
47 47

  
48
schemas/vegbien.sql: schemas/vegbank.sql VegBank-VegBIEN.schema.csv
49
	$(repl) <$+ >$@
50

  
51 48
schemas/vegbien_empty.sql: schemas/vegbien.sql
52 49
	$(empty)
53 50

  

Also available in: Unified diff