Project

General

Profile

« Previous | Next » 

Revision 525

VegBIEN: Renamed plot to location to reflect that a location can also be used for specimens

View differences:

vegbien.sql
185 185

  
186 186
CREATE TABLE commclass (
187 187
    commclass_id integer NOT NULL,
188
    plotevent_id integer NOT NULL,
188
    locationevent_id integer NOT NULL,
189 189
    inspection boolean,
190 190
    tableanalysis boolean,
191 191
    multivariateanalysis boolean,
......
950 950

  
951 951
CREATE TABLE disturbanceobs (
952 952
    disturbanceobs_id integer NOT NULL,
953
    plotevent_id integer NOT NULL,
953
    locationevent_id integer NOT NULL,
954 954
    disturbancetype character varying(30) NOT NULL,
955 955
    disturbanceintensity character varying(30),
956 956
    disturbanceage double precision,
......
985 985

  
986 986
CREATE TABLE embargo (
987 987
    embargo_id integer NOT NULL,
988
    plot_id integer NOT NULL,
988
    location_id integer NOT NULL,
989 989
    embargoreason text NOT NULL,
990 990
    defaultstatus integer NOT NULL,
991 991
    embargostart timestamp with time zone NOT NULL,
......
1018 1018

  
1019 1019
CREATE TABLE graphic (
1020 1020
    graphic_id integer NOT NULL,
1021
    plotevent_id integer NOT NULL,
1021
    locationevent_id integer NOT NULL,
1022 1022
    graphicname character varying(30),
1023 1023
    graphiclocation text,
1024 1024
    graphicdescription text,
......
1115 1115

  
1116 1116

  
1117 1117
--
1118
-- Name: location; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1119
--
1120

  
1121
CREATE TABLE location (
1122
    location_id integer NOT NULL,
1123
    sourceid character varying(30),
1124
    reference_id integer,
1125
    parent_id integer,
1126
    reallatitude double precision,
1127
    reallongitude double precision,
1128
    locationaccuracy double precision,
1129
    confidentialitystatus integer NOT NULL,
1130
    confidentialityreason character varying(200),
1131
    latitude double precision,
1132
    longitude double precision,
1133
    authore character varying(20),
1134
    authorn character varying(20),
1135
    authorzone character varying(20),
1136
    authordatum character varying(20),
1137
    authorlocation character varying(200),
1138
    locationnarrative text,
1139
    azimuth double precision,
1140
    dsgpoly text,
1141
    shape character varying(50),
1142
    area double precision,
1143
    standsize character varying(50),
1144
    placementmethod character varying(50),
1145
    permanence boolean,
1146
    layoutnarrative text,
1147
    elevation double precision,
1148
    elevationaccuracy double precision,
1149
    elevationrange double precision,
1150
    slopeaspect double precision,
1151
    minslopeaspect double precision,
1152
    maxslopeaspect double precision,
1153
    slopegradient double precision,
1154
    minslopegradient double precision,
1155
    maxslopegradient double precision,
1156
    topoposition character varying(90),
1157
    landform character varying(50),
1158
    surficialdeposits character varying(90),
1159
    rocktype character varying(90),
1160
    stateprovince character varying(55),
1161
    country character varying(100),
1162
    submitter_surname character varying(100),
1163
    submitter_givenname character varying(100),
1164
    submitter_email character varying(100),
1165
    notespublic boolean,
1166
    notesmgt boolean,
1167
    revisions boolean,
1168
    dateentered timestamp with time zone DEFAULT now(),
1169
    emb_location integer,
1170
    locationrationalenarrative text,
1171
    accessioncode character varying(255),
1172
    sublocationxposition double precision,
1173
    sublocationyposition double precision,
1174
    namedplace_id integer
1175
);
1176

  
1177

  
1178
--
1179
-- Name: location_location_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1180
--
1181

  
1182
CREATE SEQUENCE location_location_id_seq
1183
    START WITH 1
1184
    INCREMENT BY 1
1185
    NO MINVALUE
1186
    NO MAXVALUE
1187
    CACHE 1;
1188

  
1189

  
1190
--
1191
-- Name: location_location_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1192
--
1193

  
1194
ALTER SEQUENCE location_location_id_seq OWNED BY location.location_id;
1195

  
1196

  
1197
--
1198
-- Name: locationevent; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1199
--
1200

  
1201
CREATE TABLE locationevent (
1202
    locationevent_id integer NOT NULL,
1203
    previous_id integer,
1204
    location_id integer NOT NULL,
1205
    project_id integer,
1206
    sourceid character varying(30),
1207
    dateaccuracy character varying(30),
1208
    covermethod_id integer,
1209
    coverdispersion character varying(30),
1210
    autotaxoncover boolean,
1211
    stratummethod_id integer,
1212
    methodnarrative text,
1213
    taxonoccurrencearea double precision,
1214
    stemsizelimit double precision,
1215
    stemarea double precision,
1216
    stemsamplemethod character varying(30),
1217
    originaldata text,
1218
    effortlevel character varying(30),
1219
    locationvalidationlevel integer,
1220
    floristicquality character varying(30),
1221
    bryophytequality character varying(30),
1222
    lichenquality character varying(30),
1223
    locationeventnarrative text,
1224
    landscapenarrative text,
1225
    homogeneity character varying(50),
1226
    phenologicaspect character varying(30),
1227
    representativeness character varying(255),
1228
    standmaturity character varying(50),
1229
    successionalstatus text,
1230
    basalarea double precision,
1231
    hydrologicregime character varying(30),
1232
    soilmoistureregime character varying(30),
1233
    soildrainage character varying(30),
1234
    watersalinity character varying(30),
1235
    waterdepth double precision,
1236
    shoredistance double precision,
1237
    soildepth double precision,
1238
    organicdepth double precision,
1239
    soiltaxon_id integer,
1240
    soiltaxonsrc character varying(200),
1241
    percentbedrock double precision,
1242
    percentrockgravel double precision,
1243
    percentwood double precision,
1244
    percentlitter double precision,
1245
    percentbaresoil double precision,
1246
    percentwater double precision,
1247
    percentother double precision,
1248
    nameother character varying(30),
1249
    treeht double precision,
1250
    shrubht double precision,
1251
    fieldht double precision,
1252
    nonvascularht double precision,
1253
    submergedht double precision,
1254
    treecover double precision,
1255
    shrubcover double precision,
1256
    fieldcover double precision,
1257
    nonvascularcover double precision,
1258
    floatingcover double precision,
1259
    submergedcover double precision,
1260
    dominantstratum character varying(40),
1261
    growthform1type character varying(40),
1262
    growthform2type character varying(40),
1263
    growthform3type character varying(40),
1264
    growthform1cover double precision,
1265
    growthform2cover double precision,
1266
    growthform3cover double precision,
1267
    totalcover double precision,
1268
    notespublic boolean,
1269
    notesmgt boolean,
1270
    revisions boolean,
1271
    obsstartdate timestamp with time zone,
1272
    obsenddate timestamp with time zone,
1273
    dateentered timestamp with time zone DEFAULT now(),
1274
    emb_locationevent integer,
1275
    interp_orig_ci_id integer,
1276
    interp_orig_cc_id integer,
1277
    interp_orig_sciname text,
1278
    interp_orig_code text,
1279
    interp_orig_party_id integer,
1280
    interp_orig_partyname text,
1281
    interp_current_ci_id integer,
1282
    interp_current_cc_id integer,
1283
    interp_current_sciname text,
1284
    interp_current_code text,
1285
    interp_current_party_id integer,
1286
    interp_current_partyname text,
1287
    interp_bestfit_ci_id integer,
1288
    interp_bestfit_cc_id integer,
1289
    interp_bestfit_sciname text,
1290
    interp_bestfit_code text,
1291
    interp_bestfit_party_id integer,
1292
    interp_bestfit_partyname text,
1293
    toptaxon1name character varying(255),
1294
    toptaxon2name character varying(255),
1295
    toptaxon3name character varying(255),
1296
    toptaxon4name character varying(255),
1297
    toptaxon5name character varying(255),
1298
    numberoftaxa integer,
1299
    accessioncode character varying(255)
1300
);
1301

  
1302

  
1303
--
1304
-- Name: TABLE locationevent; Type: COMMENT; Schema: public; Owner: -
1305
--
1306

  
1307
COMMENT ON TABLE locationevent IS 'VegBank''s observation table.';
1308

  
1309

  
1310
--
1311
-- Name: locationevent_locationevent_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1312
--
1313

  
1314
CREATE SEQUENCE locationevent_locationevent_id_seq
1315
    START WITH 1
1316
    INCREMENT BY 1
1317
    NO MINVALUE
1318
    NO MAXVALUE
1319
    CACHE 1;
1320

  
1321

  
1322
--
1323
-- Name: locationevent_locationevent_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1324
--
1325

  
1326
ALTER SEQUENCE locationevent_locationevent_id_seq OWNED BY locationevent.locationevent_id;
1327

  
1328

  
1329
--
1330
-- Name: locationeventcontributor; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1331
--
1332

  
1333
CREATE TABLE locationeventcontributor (
1334
    locationeventcontributor_id integer NOT NULL,
1335
    locationevent_id integer NOT NULL,
1336
    party_id integer NOT NULL,
1337
    role_id integer NOT NULL,
1338
    contributiondate timestamp with time zone
1339
);
1340

  
1341

  
1342
--
1343
-- Name: locationeventcontributor_locationeventcontributor_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1344
--
1345

  
1346
CREATE SEQUENCE locationeventcontributor_locationeventcontributor_id_seq
1347
    START WITH 1
1348
    INCREMENT BY 1
1349
    NO MINVALUE
1350
    NO MAXVALUE
1351
    CACHE 1;
1352

  
1353

  
1354
--
1355
-- Name: locationeventcontributor_locationeventcontributor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1356
--
1357

  
1358
ALTER SEQUENCE locationeventcontributor_locationeventcontributor_id_seq OWNED BY locationeventcontributor.locationeventcontributor_id;
1359

  
1360

  
1361
--
1362
-- Name: locationeventsynonym; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1363
--
1364

  
1365
CREATE TABLE locationeventsynonym (
1366
    locationeventsynonym_id integer NOT NULL,
1367
    synonymlocationevent_id integer NOT NULL,
1368
    primarylocationevent_id integer NOT NULL,
1369
    party_id integer NOT NULL,
1370
    role_id integer NOT NULL,
1371
    synonymcomment text,
1372
    classstartdate timestamp with time zone DEFAULT now() NOT NULL,
1373
    classstopdate timestamp with time zone,
1374
    accessioncode character varying(255)
1375
);
1376

  
1377

  
1378
--
1379
-- Name: locationeventsynonym_locationeventsynonym_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1380
--
1381

  
1382
CREATE SEQUENCE locationeventsynonym_locationeventsynonym_id_seq
1383
    START WITH 1
1384
    INCREMENT BY 1
1385
    NO MINVALUE
1386
    NO MAXVALUE
1387
    CACHE 1;
1388

  
1389

  
1390
--
1391
-- Name: locationeventsynonym_locationeventsynonym_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1392
--
1393

  
1394
ALTER SEQUENCE locationeventsynonym_locationeventsynonym_id_seq OWNED BY locationeventsynonym.locationeventsynonym_id;
1395

  
1396

  
1397
--
1118 1398
-- Name: namedplace; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1119 1399
--
1120 1400

  
......
1325 1605
--
1326 1606

  
1327 1607
CREATE TABLE place (
1328
    plotplace_id integer NOT NULL,
1329
    plot_id integer NOT NULL,
1608
    locationplace_id integer NOT NULL,
1609
    location_id integer NOT NULL,
1330 1610
    calculated boolean,
1331 1611
    namedplace_id integer NOT NULL
1332 1612
);
1333 1613

  
1334 1614

  
1335 1615
--
1336
-- Name: place_plotplace_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1616
-- Name: place_locationplace_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1337 1617
--
1338 1618

  
1339
CREATE SEQUENCE place_plotplace_id_seq
1619
CREATE SEQUENCE place_locationplace_id_seq
1340 1620
    START WITH 1
1341 1621
    INCREMENT BY 1
1342 1622
    NO MINVALUE
......
1345 1625

  
1346 1626

  
1347 1627
--
1348
-- Name: place_plotplace_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1628
-- Name: place_locationplace_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1349 1629
--
1350 1630

  
1351
ALTER SEQUENCE place_plotplace_id_seq OWNED BY place.plotplace_id;
1631
ALTER SEQUENCE place_locationplace_id_seq OWNED BY place.locationplace_id;
1352 1632

  
1353 1633

  
1354 1634
--
......
1560 1840

  
1561 1841

  
1562 1842
--
1563
-- Name: plot; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1564
--
1565

  
1566
CREATE TABLE plot (
1567
    plot_id integer NOT NULL,
1568
    sourceid character varying(30),
1569
    reference_id integer,
1570
    parent_id integer,
1571
    reallatitude double precision,
1572
    reallongitude double precision,
1573
    locationaccuracy double precision,
1574
    confidentialitystatus integer NOT NULL,
1575
    confidentialityreason character varying(200),
1576
    latitude double precision,
1577
    longitude double precision,
1578
    authore character varying(20),
1579
    authorn character varying(20),
1580
    authorzone character varying(20),
1581
    authordatum character varying(20),
1582
    authorlocation character varying(200),
1583
    locationnarrative text,
1584
    azimuth double precision,
1585
    dsgpoly text,
1586
    shape character varying(50),
1587
    area double precision,
1588
    standsize character varying(50),
1589
    placementmethod character varying(50),
1590
    permanence boolean,
1591
    layoutnarrative text,
1592
    elevation double precision,
1593
    elevationaccuracy double precision,
1594
    elevationrange double precision,
1595
    slopeaspect double precision,
1596
    minslopeaspect double precision,
1597
    maxslopeaspect double precision,
1598
    slopegradient double precision,
1599
    minslopegradient double precision,
1600
    maxslopegradient double precision,
1601
    topoposition character varying(90),
1602
    landform character varying(50),
1603
    surficialdeposits character varying(90),
1604
    rocktype character varying(90),
1605
    stateprovince character varying(55),
1606
    country character varying(100),
1607
    submitter_surname character varying(100),
1608
    submitter_givenname character varying(100),
1609
    submitter_email character varying(100),
1610
    notespublic boolean,
1611
    notesmgt boolean,
1612
    revisions boolean,
1613
    dateentered timestamp with time zone DEFAULT now(),
1614
    emb_plot integer,
1615
    plotrationalenarrative text,
1616
    accessioncode character varying(255),
1617
    subplotxposition double precision,
1618
    subplotyposition double precision,
1619
    namedplace_id integer
1620
);
1621

  
1622

  
1623
--
1624
-- Name: plot_plot_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1625
--
1626

  
1627
CREATE SEQUENCE plot_plot_id_seq
1628
    START WITH 1
1629
    INCREMENT BY 1
1630
    NO MINVALUE
1631
    NO MAXVALUE
1632
    CACHE 1;
1633

  
1634

  
1635
--
1636
-- Name: plot_plot_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1637
--
1638

  
1639
ALTER SEQUENCE plot_plot_id_seq OWNED BY plot.plot_id;
1640

  
1641

  
1642
--
1643
-- Name: plotevent; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1644
--
1645

  
1646
CREATE TABLE plotevent (
1647
    plotevent_id integer NOT NULL,
1648
    previous_id integer,
1649
    plot_id integer NOT NULL,
1650
    project_id integer,
1651
    sourceid character varying(30),
1652
    dateaccuracy character varying(30),
1653
    covermethod_id integer,
1654
    coverdispersion character varying(30),
1655
    autotaxoncover boolean,
1656
    stratummethod_id integer,
1657
    methodnarrative text,
1658
    taxonoccurrencearea double precision,
1659
    stemsizelimit double precision,
1660
    stemarea double precision,
1661
    stemsamplemethod character varying(30),
1662
    originaldata text,
1663
    effortlevel character varying(30),
1664
    plotvalidationlevel integer,
1665
    floristicquality character varying(30),
1666
    bryophytequality character varying(30),
1667
    lichenquality character varying(30),
1668
    ploteventnarrative text,
1669
    landscapenarrative text,
1670
    homogeneity character varying(50),
1671
    phenologicaspect character varying(30),
1672
    representativeness character varying(255),
1673
    standmaturity character varying(50),
1674
    successionalstatus text,
1675
    basalarea double precision,
1676
    hydrologicregime character varying(30),
1677
    soilmoistureregime character varying(30),
1678
    soildrainage character varying(30),
1679
    watersalinity character varying(30),
1680
    waterdepth double precision,
1681
    shoredistance double precision,
1682
    soildepth double precision,
1683
    organicdepth double precision,
1684
    soiltaxon_id integer,
1685
    soiltaxonsrc character varying(200),
1686
    percentbedrock double precision,
1687
    percentrockgravel double precision,
1688
    percentwood double precision,
1689
    percentlitter double precision,
1690
    percentbaresoil double precision,
1691
    percentwater double precision,
1692
    percentother double precision,
1693
    nameother character varying(30),
1694
    treeht double precision,
1695
    shrubht double precision,
1696
    fieldht double precision,
1697
    nonvascularht double precision,
1698
    submergedht double precision,
1699
    treecover double precision,
1700
    shrubcover double precision,
1701
    fieldcover double precision,
1702
    nonvascularcover double precision,
1703
    floatingcover double precision,
1704
    submergedcover double precision,
1705
    dominantstratum character varying(40),
1706
    growthform1type character varying(40),
1707
    growthform2type character varying(40),
1708
    growthform3type character varying(40),
1709
    growthform1cover double precision,
1710
    growthform2cover double precision,
1711
    growthform3cover double precision,
1712
    totalcover double precision,
1713
    notespublic boolean,
1714
    notesmgt boolean,
1715
    revisions boolean,
1716
    obsstartdate timestamp with time zone,
1717
    obsenddate timestamp with time zone,
1718
    dateentered timestamp with time zone DEFAULT now(),
1719
    emb_plotevent integer,
1720
    interp_orig_ci_id integer,
1721
    interp_orig_cc_id integer,
1722
    interp_orig_sciname text,
1723
    interp_orig_code text,
1724
    interp_orig_party_id integer,
1725
    interp_orig_partyname text,
1726
    interp_current_ci_id integer,
1727
    interp_current_cc_id integer,
1728
    interp_current_sciname text,
1729
    interp_current_code text,
1730
    interp_current_party_id integer,
1731
    interp_current_partyname text,
1732
    interp_bestfit_ci_id integer,
1733
    interp_bestfit_cc_id integer,
1734
    interp_bestfit_sciname text,
1735
    interp_bestfit_code text,
1736
    interp_bestfit_party_id integer,
1737
    interp_bestfit_partyname text,
1738
    toptaxon1name character varying(255),
1739
    toptaxon2name character varying(255),
1740
    toptaxon3name character varying(255),
1741
    toptaxon4name character varying(255),
1742
    toptaxon5name character varying(255),
1743
    numberoftaxa integer,
1744
    accessioncode character varying(255)
1745
);
1746

  
1747

  
1748
--
1749
-- Name: TABLE plotevent; Type: COMMENT; Schema: public; Owner: -
1750
--
1751

  
1752
COMMENT ON TABLE plotevent IS 'VegBank''s observation table.';
1753

  
1754

  
1755
--
1756
-- Name: plotevent_plotevent_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1757
--
1758

  
1759
CREATE SEQUENCE plotevent_plotevent_id_seq
1760
    START WITH 1
1761
    INCREMENT BY 1
1762
    NO MINVALUE
1763
    NO MAXVALUE
1764
    CACHE 1;
1765

  
1766

  
1767
--
1768
-- Name: plotevent_plotevent_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1769
--
1770

  
1771
ALTER SEQUENCE plotevent_plotevent_id_seq OWNED BY plotevent.plotevent_id;
1772

  
1773

  
1774
--
1775
-- Name: ploteventcontributor; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1776
--
1777

  
1778
CREATE TABLE ploteventcontributor (
1779
    ploteventcontributor_id integer NOT NULL,
1780
    plotevent_id integer NOT NULL,
1781
    party_id integer NOT NULL,
1782
    role_id integer NOT NULL,
1783
    contributiondate timestamp with time zone
1784
);
1785

  
1786

  
1787
--
1788
-- Name: ploteventcontributor_ploteventcontributor_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1789
--
1790

  
1791
CREATE SEQUENCE ploteventcontributor_ploteventcontributor_id_seq
1792
    START WITH 1
1793
    INCREMENT BY 1
1794
    NO MINVALUE
1795
    NO MAXVALUE
1796
    CACHE 1;
1797

  
1798

  
1799
--
1800
-- Name: ploteventcontributor_ploteventcontributor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1801
--
1802

  
1803
ALTER SEQUENCE ploteventcontributor_ploteventcontributor_id_seq OWNED BY ploteventcontributor.ploteventcontributor_id;
1804

  
1805

  
1806
--
1807
-- Name: ploteventsynonym; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1808
--
1809

  
1810
CREATE TABLE ploteventsynonym (
1811
    ploteventsynonym_id integer NOT NULL,
1812
    synonymplotevent_id integer NOT NULL,
1813
    primaryplotevent_id integer NOT NULL,
1814
    party_id integer NOT NULL,
1815
    role_id integer NOT NULL,
1816
    synonymcomment text,
1817
    classstartdate timestamp with time zone DEFAULT now() NOT NULL,
1818
    classstopdate timestamp with time zone,
1819
    accessioncode character varying(255)
1820
);
1821

  
1822

  
1823
--
1824
-- Name: ploteventsynonym_ploteventsynonym_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1825
--
1826

  
1827
CREATE SEQUENCE ploteventsynonym_ploteventsynonym_id_seq
1828
    START WITH 1
1829
    INCREMENT BY 1
1830
    NO MINVALUE
1831
    NO MAXVALUE
1832
    CACHE 1;
1833

  
1834

  
1835
--
1836
-- Name: ploteventsynonym_ploteventsynonym_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1837
--
1838

  
1839
ALTER SEQUENCE ploteventsynonym_ploteventsynonym_id_seq OWNED BY ploteventsynonym.ploteventsynonym_id;
1840

  
1841

  
1842
--
1843 1843
-- Name: project; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1844 1844
--
1845 1845

  
......
1850 1850
    startdate timestamp with time zone,
1851 1851
    stopdate timestamp with time zone,
1852 1852
    d_obscount integer,
1853
    d_lastplotaddeddate timestamp with time zone,
1853
    d_lastlocationaddeddate timestamp with time zone,
1854 1854
    accessioncode character varying(255)
1855 1855
);
1856 1856

  
......
2180 2180

  
2181 2181
CREATE TABLE soilobs (
2182 2182
    soilobs_id integer NOT NULL,
2183
    plotevent_id integer NOT NULL,
2183
    locationevent_id integer NOT NULL,
2184 2184
    soilhorizon character varying(15) NOT NULL,
2185 2185
    soildepthtop double precision,
2186 2186
    soildepthbottom double precision,
......
2352 2352

  
2353 2353
CREATE TABLE stratum (
2354 2354
    stratum_id integer NOT NULL,
2355
    plotevent_id integer NOT NULL,
2355
    locationevent_id integer NOT NULL,
2356 2356
    stratumtype_id integer NOT NULL,
2357 2357
    stratummethod_id integer,
2358 2358
    stratumname character varying(30),
......
2565 2565

  
2566 2566
CREATE TABLE taxonoccurrence (
2567 2567
    taxonoccurrence_id integer NOT NULL,
2568
    plotevent_id integer NOT NULL,
2568
    locationevent_id integer NOT NULL,
2569 2569
    authorplantname character varying(255),
2570 2570
    reference_id integer,
2571 2571
    taxoninferencearea double precision,
......
3365 3365

  
3366 3366

  
3367 3367
--
3368
-- Name: location_id; Type: DEFAULT; Schema: public; Owner: -
3369
--
3370

  
3371
ALTER TABLE location ALTER COLUMN location_id SET DEFAULT nextval('location_location_id_seq'::regclass);
3372

  
3373

  
3374
--
3375
-- Name: locationevent_id; Type: DEFAULT; Schema: public; Owner: -
3376
--
3377

  
3378
ALTER TABLE locationevent ALTER COLUMN locationevent_id SET DEFAULT nextval('locationevent_locationevent_id_seq'::regclass);
3379

  
3380

  
3381
--
3382
-- Name: locationeventcontributor_id; Type: DEFAULT; Schema: public; Owner: -
3383
--
3384

  
3385
ALTER TABLE locationeventcontributor ALTER COLUMN locationeventcontributor_id SET DEFAULT nextval('locationeventcontributor_locationeventcontributor_id_seq'::regclass);
3386

  
3387

  
3388
--
3389
-- Name: locationeventsynonym_id; Type: DEFAULT; Schema: public; Owner: -
3390
--
3391

  
3392
ALTER TABLE locationeventsynonym ALTER COLUMN locationeventsynonym_id SET DEFAULT nextval('locationeventsynonym_locationeventsynonym_id_seq'::regclass);
3393

  
3394

  
3395
--
3368 3396
-- Name: namedplace_id; Type: DEFAULT; Schema: public; Owner: -
3369 3397
--
3370 3398

  
......
3407 3435

  
3408 3436

  
3409 3437
--
3410
-- Name: plotplace_id; Type: DEFAULT; Schema: public; Owner: -
3438
-- Name: locationplace_id; Type: DEFAULT; Schema: public; Owner: -
3411 3439
--
3412 3440

  
3413
ALTER TABLE place ALTER COLUMN plotplace_id SET DEFAULT nextval('place_plotplace_id_seq'::regclass);
3441
ALTER TABLE place ALTER COLUMN locationplace_id SET DEFAULT nextval('place_locationplace_id_seq'::regclass);
3414 3442

  
3415 3443

  
3416 3444
--
......
3456 3484

  
3457 3485

  
3458 3486
--
3459
-- Name: plot_id; Type: DEFAULT; Schema: public; Owner: -
3460
--
3461

  
3462
ALTER TABLE plot ALTER COLUMN plot_id SET DEFAULT nextval('plot_plot_id_seq'::regclass);
3463

  
3464

  
3465
--
3466
-- Name: plotevent_id; Type: DEFAULT; Schema: public; Owner: -
3467
--
3468

  
3469
ALTER TABLE plotevent ALTER COLUMN plotevent_id SET DEFAULT nextval('plotevent_plotevent_id_seq'::regclass);
3470

  
3471

  
3472
--
3473
-- Name: ploteventcontributor_id; Type: DEFAULT; Schema: public; Owner: -
3474
--
3475

  
3476
ALTER TABLE ploteventcontributor ALTER COLUMN ploteventcontributor_id SET DEFAULT nextval('ploteventcontributor_ploteventcontributor_id_seq'::regclass);
3477

  
3478

  
3479
--
3480
-- Name: ploteventsynonym_id; Type: DEFAULT; Schema: public; Owner: -
3481
--
3482

  
3483
ALTER TABLE ploteventsynonym ALTER COLUMN ploteventsynonym_id SET DEFAULT nextval('ploteventsynonym_ploteventsynonym_id_seq'::regclass);
3484

  
3485

  
3486
--
3487 3487
-- Name: project_id; Type: DEFAULT; Schema: public; Owner: -
3488 3488
--
3489 3489

  
......
3766 3766
--
3767 3767

  
3768 3768
ALTER TABLE ONLY commclass
3769
    ADD CONSTRAINT commclass_keys UNIQUE (plotevent_id, classnotes);
3769
    ADD CONSTRAINT commclass_keys UNIQUE (locationevent_id, classnotes);
3770 3770

  
3771 3771

  
3772 3772
--
......
4010 4010

  
4011 4011

  
4012 4012
--
4013
-- Name: location_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4014
--
4015

  
4016
ALTER TABLE ONLY location
4017
    ADD CONSTRAINT location_keys UNIQUE (reference_id, parent_id, sourceid);
4018

  
4019

  
4020
--
4021
-- Name: location_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4022
--
4023

  
4024
ALTER TABLE ONLY location
4025
    ADD CONSTRAINT location_pkey PRIMARY KEY (location_id);
4026

  
4027

  
4028
--
4029
-- Name: locationevent_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4030
--
4031

  
4032
ALTER TABLE ONLY locationevent
4033
    ADD CONSTRAINT locationevent_keys UNIQUE (location_id, project_id, sourceid);
4034

  
4035

  
4036
--
4037
-- Name: locationevent_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4038
--
4039

  
4040
ALTER TABLE ONLY locationevent
4041
    ADD CONSTRAINT locationevent_pkey PRIMARY KEY (locationevent_id);
4042

  
4043

  
4044
--
4045
-- Name: locationeventcontributor_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4046
--
4047

  
4048
ALTER TABLE ONLY locationeventcontributor
4049
    ADD CONSTRAINT locationeventcontributor_pkey PRIMARY KEY (locationeventcontributor_id);
4050

  
4051

  
4052
--
4053
-- Name: locationeventsynonym_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4054
--
4055

  
4056
ALTER TABLE ONLY locationeventsynonym
4057
    ADD CONSTRAINT locationeventsynonym_pkey PRIMARY KEY (locationeventsynonym_id);
4058

  
4059

  
4060
--
4013 4061
-- Name: namedplace_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4014 4062
--
4015 4063

  
......
4078 4126
--
4079 4127

  
4080 4128
ALTER TABLE ONLY place
4081
    ADD CONSTRAINT place_keys UNIQUE (plot_id, namedplace_id);
4129
    ADD CONSTRAINT place_keys UNIQUE (location_id, namedplace_id);
4082 4130

  
4083 4131

  
4084 4132
--
......
4086 4134
--
4087 4135

  
4088 4136
ALTER TABLE ONLY place
4089
    ADD CONSTRAINT place_pkey PRIMARY KEY (plotplace_id);
4137
    ADD CONSTRAINT place_pkey PRIMARY KEY (locationplace_id);
4090 4138

  
4091 4139

  
4092 4140
--
......
4138 4186

  
4139 4187

  
4140 4188
--
4141
-- Name: plot_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4142
--
4143

  
4144
ALTER TABLE ONLY plot
4145
    ADD CONSTRAINT plot_keys UNIQUE (reference_id, parent_id, sourceid);
4146

  
4147

  
4148
--
4149
-- Name: plot_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4150
--
4151

  
4152
ALTER TABLE ONLY plot
4153
    ADD CONSTRAINT plot_pkey PRIMARY KEY (plot_id);
4154

  
4155

  
4156
--
4157
-- Name: plotevent_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4158
--
4159

  
4160
ALTER TABLE ONLY plotevent
4161
    ADD CONSTRAINT plotevent_keys UNIQUE (plot_id, project_id, sourceid);
4162

  
4163

  
4164
--
4165
-- Name: plotevent_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4166
--
4167

  
4168
ALTER TABLE ONLY plotevent
4169
    ADD CONSTRAINT plotevent_pkey PRIMARY KEY (plotevent_id);
4170

  
4171

  
4172
--
4173
-- Name: ploteventcontributor_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4174
--
4175

  
4176
ALTER TABLE ONLY ploteventcontributor
4177
    ADD CONSTRAINT ploteventcontributor_pkey PRIMARY KEY (ploteventcontributor_id);
4178

  
4179

  
4180
--
4181
-- Name: ploteventsynonym_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4182
--
4183

  
4184
ALTER TABLE ONLY ploteventsynonym
4185
    ADD CONSTRAINT ploteventsynonym_pkey PRIMARY KEY (ploteventsynonym_id);
4186

  
4187

  
4188
--
4189 4189
-- Name: project_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4190 4190
--
4191 4191

  
......
4270 4270
--
4271 4271

  
4272 4272
ALTER TABLE ONLY soilobs
4273
    ADD CONSTRAINT soilobs_keys UNIQUE (plotevent_id);
4273
    ADD CONSTRAINT soilobs_keys UNIQUE (locationevent_id);
4274 4274

  
4275 4275

  
4276 4276
--
......
4600 4600

  
4601 4601

  
4602 4602
--
4603
-- Name: commclass_plotevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4603
-- Name: commclass_locationevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4604 4604
--
4605 4605

  
4606
CREATE INDEX commclass_plotevent_id_x ON commclass USING btree (plotevent_id);
4606
CREATE INDEX commclass_locationevent_id_x ON commclass USING btree (locationevent_id);
4607 4607

  
4608 4608

  
4609 4609
--
......
4810 4810

  
4811 4811

  
4812 4812
--
4813
-- Name: disturbanceobs_plotevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4813
-- Name: disturbanceobs_locationevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4814 4814
--
4815 4815

  
4816
CREATE INDEX disturbanceobs_plotevent_id_x ON disturbanceobs USING btree (plotevent_id);
4816
CREATE INDEX disturbanceobs_locationevent_id_x ON disturbanceobs USING btree (locationevent_id);
4817 4817

  
4818 4818

  
4819 4819
--
......
4859 4859

  
4860 4860

  
4861 4861
--
4862
-- Name: emb_plot_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4862
-- Name: emb_location_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4863 4863
--
4864 4864

  
4865
CREATE INDEX emb_plot_idx ON plot USING btree (emb_plot);
4865
CREATE INDEX emb_location_idx ON location USING btree (emb_location);
4866 4866

  
4867 4867

  
4868 4868
--
4869
-- Name: emb_plotevent_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4869
-- Name: emb_locationevent_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4870 4870
--
4871 4871

  
4872
CREATE INDEX emb_plotevent_idx ON plotevent USING btree (emb_plotevent);
4872
CREATE INDEX emb_locationevent_idx ON locationevent USING btree (emb_locationevent);
4873 4873

  
4874 4874

  
4875 4875
--
......
4908 4908

  
4909 4909

  
4910 4910
--
4911
-- Name: embargo_plot_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4911
-- Name: embargo_location_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4912 4912
--
4913 4913

  
4914
CREATE INDEX embargo_plot_id_x ON embargo USING btree (plot_id);
4914
CREATE INDEX embargo_location_id_x ON embargo USING btree (location_id);
4915 4915

  
4916 4916

  
4917 4917
--
4918
-- Name: fki_plot_namedplace_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4918
-- Name: fki_location_namedplace_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4919 4919
--
4920 4920

  
4921
CREATE INDEX fki_plot_namedplace_id ON plot USING btree (namedplace_id);
4921
CREATE INDEX fki_location_namedplace_id ON location USING btree (namedplace_id);
4922 4922

  
4923 4923

  
4924 4924
--
......
4971 4971

  
4972 4972

  
4973 4973
--
4974
-- Name: graphic_plotevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4974
-- Name: graphic_locationevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4975 4975
--
4976 4976

  
4977
CREATE INDEX graphic_plotevent_id_x ON graphic USING btree (plotevent_id);
4977
CREATE INDEX graphic_locationevent_id_x ON graphic USING btree (locationevent_id);
4978 4978

  
4979 4979

  
4980 4980
--
......
4992 4992

  
4993 4993

  
4994 4994
--
4995
-- Name: namedplace_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4995
-- Name: location_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4996 4996
--
4997 4997

  
4998
CREATE UNIQUE INDEX namedplace_accessioncode_index ON namedplace USING btree (accessioncode);
4998
CREATE UNIQUE INDEX location_accessioncode_index ON location USING btree (accessioncode);
4999 4999

  
5000 5000

  
5001 5001
--
5002
-- Name: namedplace_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5002
-- Name: location_parent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5003 5003
--
5004 5004

  
5005
CREATE INDEX namedplace_reference_id_x ON namedplace USING btree (reference_id);
5005
CREATE INDEX location_parent_id_x ON location USING btree (parent_id);
5006 5006

  
5007 5007

  
5008 5008
--
5009
-- Name: note_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5009
-- Name: location_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5010 5010
--
5011 5011

  
5012
CREATE UNIQUE INDEX note_accessioncode_index ON note USING btree (accessioncode);
5012
CREATE INDEX location_reference_id_x ON location USING btree (reference_id);
5013 5013

  
5014 5014

  
5015 5015
--
5016
-- Name: note_notelink_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5016
-- Name: locationevent_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5017 5017
--
5018 5018

  
5019
CREATE INDEX note_notelink_id_x ON note USING btree (notelink_id);
5019
CREATE UNIQUE INDEX locationevent_accessioncode_index ON locationevent USING btree (accessioncode);
5020 5020

  
5021 5021

  
5022 5022
--
5023
-- Name: note_party_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5023
-- Name: locationevent_covermethod_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5024 5024
--
5025 5025

  
5026
CREATE INDEX note_party_id_x ON note USING btree (party_id);
5026
CREATE INDEX locationevent_covermethod_id_x ON locationevent USING btree (covermethod_id);
5027 5027

  
5028 5028

  
5029 5029
--
5030
-- Name: note_role_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5030
-- Name: locationevent_location_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5031 5031
--
5032 5032

  
5033
CREATE INDEX note_role_id_x ON note USING btree (role_id);
5033
CREATE INDEX locationevent_location_id_x ON locationevent USING btree (location_id);
5034 5034

  
5035 5035

  
5036 5036
--
5037
-- Name: party_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5037
-- Name: locationevent_previousobs_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5038 5038
--
5039 5039

  
5040
CREATE UNIQUE INDEX party_accessioncode_index ON party USING btree (accessioncode);
5040
CREATE INDEX locationevent_previousobs_id_x ON locationevent USING btree (previous_id);
5041 5041

  
5042 5042

  
5043 5043
--
5044
-- Name: party_currentname_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5044
-- Name: locationevent_project_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5045 5045
--
5046 5046

  
5047
CREATE INDEX party_currentname_id_x ON party USING btree (currentname_id);
5047
CREATE INDEX locationevent_project_id_x ON locationevent USING btree (project_id);
5048 5048

  
5049 5049

  
5050 5050
--
5051
-- Name: partymember_childparty_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5051
-- Name: locationevent_soiltaxon_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5052 5052
--
5053 5053

  
5054
CREATE INDEX partymember_childparty_id_x ON partymember USING btree (childparty_id);
5054
CREATE INDEX locationevent_soiltaxon_id_x ON locationevent USING btree (soiltaxon_id);
5055 5055

  
5056 5056

  
5057 5057
--
5058
-- Name: partymember_parentparty_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5058
-- Name: locationevent_stratummethod_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5059 5059
--
5060 5060

  
5061
CREATE INDEX partymember_parentparty_id_x ON partymember USING btree (parentparty_id);
5061
CREATE INDEX locationevent_stratummethod_id_x ON locationevent USING btree (stratummethod_id);
5062 5062

  
5063 5063

  
5064 5064
--
5065
-- Name: partymember_role_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5065
-- Name: locationeventcontributor_locationevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5066 5066
--
5067 5067

  
5068
CREATE INDEX partymember_role_id_x ON partymember USING btree (role_id);
5068
CREATE INDEX locationeventcontributor_locationevent_id_x ON locationeventcontributor USING btree (locationevent_id);
5069 5069

  
5070 5070

  
5071 5071
--
5072
-- Name: place_namedplace_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5072
-- Name: locationeventcontributor_party_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5073 5073
--
5074 5074

  
5075
CREATE INDEX place_namedplace_id_x ON place USING btree (namedplace_id);
5075
CREATE INDEX locationeventcontributor_party_id_x ON locationeventcontributor USING btree (party_id);
5076 5076

  
5077 5077

  
5078 5078
--
5079
-- Name: place_plot_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5079
-- Name: locationeventcontributor_role_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5080 5080
--
5081 5081

  
5082
CREATE INDEX place_plot_id_x ON place USING btree (plot_id);
5082
CREATE INDEX locationeventcontributor_role_id_x ON locationeventcontributor USING btree (role_id);
5083 5083

  
5084 5084

  
5085 5085
--
5086
-- Name: plantconcept_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5086
-- Name: locationeventsynonym_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5087 5087
--
5088 5088

  
5089
CREATE UNIQUE INDEX plantconcept_accessioncode_index ON plantconcept USING btree (accessioncode);
5089
CREATE UNIQUE INDEX locationeventsynonym_accessioncode_index ON locationeventsynonym USING btree (accessioncode);
5090 5090

  
5091 5091

  
5092 5092
--
5093
-- Name: plantconcept_dobscount_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5093
-- Name: locationeventsynonym_party_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5094 5094
--
5095 5095

  
5096
CREATE INDEX plantconcept_dobscount_x ON plantconcept USING btree (d_obscount);
5096
CREATE INDEX locationeventsynonym_party_id_x ON locationeventsynonym USING btree (party_id);
5097 5097

  
5098 5098

  
5099 5099
--
5100
-- Name: plantconcept_plantname_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5100
-- Name: locationeventsynonym_primarylocationevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5101 5101
--
5102 5102

  
5103
CREATE INDEX plantconcept_plantname_id_x ON plantconcept USING btree (plantname_id);
5103
CREATE INDEX locationeventsynonym_primarylocationevent_id_x ON locationeventsynonym USING btree (primarylocationevent_id);
5104 5104

  
5105 5105

  
5106 5106
--
5107
-- Name: plantconcept_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5107
-- Name: locationeventsynonym_role_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5108 5108
--
5109 5109

  
5110
CREATE INDEX plantconcept_reference_id_x ON plantconcept USING btree (reference_id);
5110
CREATE INDEX locationeventsynonym_role_id_x ON locationeventsynonym USING btree (role_id);
5111 5111

  
5112 5112

  
5113 5113
--
5114
-- Name: plantcorrelation_plantconcept_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5114
-- Name: locationeventsynonym_synonymlocationevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5115 5115
--
5116 5116

  
5117
CREATE INDEX plantcorrelation_plantconcept_id_x ON plantcorrelation USING btree (plantconcept_id);
5117
CREATE INDEX locationeventsynonym_synonymlocationevent_id_x ON locationeventsynonym USING btree (synonymlocationevent_id);
5118 5118

  
5119 5119

  
5120 5120
--
5121
-- Name: plantcorrelation_plantstatus_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5121
-- Name: namedplace_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5122 5122
--
5123 5123

  
5124
CREATE INDEX plantcorrelation_plantstatus_id_x ON plantcorrelation USING btree (plantstatus_id);
5124
CREATE UNIQUE INDEX namedplace_accessioncode_index ON namedplace USING btree (accessioncode);
5125 5125

  
5126 5126

  
5127 5127
--
5128
-- Name: plantlineage_childplantstatus_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5128
-- Name: namedplace_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5129 5129
--
5130 5130

  
5131
CREATE INDEX plantlineage_childplantstatus_id_x ON plantlineage USING btree (childplantstatus_id);
5131
CREATE INDEX namedplace_reference_id_x ON namedplace USING btree (reference_id);
5132 5132

  
5133 5133

  
5134 5134
--
5135
-- Name: plantlineage_parentplantstatus_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5135
-- Name: note_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5136 5136
--
5137 5137

  
5138
CREATE INDEX plantlineage_parentplantstatus_id_x ON plantlineage USING btree (parentplantstatus_id);
5138
CREATE UNIQUE INDEX note_accessioncode_index ON note USING btree (accessioncode);
5139 5139

  
5140 5140

  
5141 5141
--
5142
-- Name: plantname_plantname_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5142
-- Name: note_notelink_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5143 5143
--
5144 5144

  
5145
CREATE INDEX plantname_plantname_x ON plantname USING btree (plantname);
5145
CREATE INDEX note_notelink_id_x ON note USING btree (notelink_id);
5146 5146

  
5147 5147

  
5148 5148
--
5149
-- Name: plantname_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5149
-- Name: note_party_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5150 5150
--
5151 5151

  
5152
CREATE INDEX plantname_reference_id_x ON plantname USING btree (reference_id);
5152
CREATE INDEX note_party_id_x ON note USING btree (party_id);
5153 5153

  
5154 5154

  
5155 5155
--
5156
-- Name: plantstatus_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5156
-- Name: note_role_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5157 5157
--
5158 5158

  
5159
CREATE UNIQUE INDEX plantstatus_accessioncode_index ON plantstatus USING btree (accessioncode);
5159
CREATE INDEX note_role_id_x ON note USING btree (role_id);
5160 5160

  
5161 5161

  
5162 5162
--
5163
-- Name: plantstatus_party_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5163
-- Name: party_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5164 5164
--
5165 5165

  
5166
CREATE INDEX plantstatus_party_id_x ON plantstatus USING btree (party_id);
5166
CREATE UNIQUE INDEX party_accessioncode_index ON party USING btree (accessioncode);
5167 5167

  
5168 5168

  
5169 5169
--
5170
-- Name: plantstatus_plantconcept_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5170
-- Name: party_currentname_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5171 5171
--
5172 5172

  
5173
CREATE INDEX plantstatus_plantconcept_id_x ON plantstatus USING btree (plantconcept_id);
5173
CREATE INDEX party_currentname_id_x ON party USING btree (currentname_id);
5174 5174

  
5175 5175

  
5176 5176
--
5177
-- Name: plantstatus_plantlevel_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5177
-- Name: partymember_childparty_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5178 5178
--
5179 5179

  
5180
CREATE INDEX plantstatus_plantlevel_x ON plantstatus USING btree (plantlevel);
5180
CREATE INDEX partymember_childparty_id_x ON partymember USING btree (childparty_id);
5181 5181

  
5182 5182

  
5183 5183
--
5184
-- Name: plantstatus_plantparent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5184
-- Name: partymember_parentparty_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5185 5185
--
5186 5186

  
5187
CREATE INDEX plantstatus_plantparent_id_x ON plantstatus USING btree (plantparent_id);
5187
CREATE INDEX partymember_parentparty_id_x ON partymember USING btree (parentparty_id);
5188 5188

  
5189 5189

  
5190 5190
--
5191
-- Name: plantstatus_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5191
-- Name: partymember_role_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5192 5192
--
5193 5193

  
5194
CREATE INDEX plantstatus_reference_id_x ON plantstatus USING btree (reference_id);
5194
CREATE INDEX partymember_role_id_x ON partymember USING btree (role_id);
5195 5195

  
5196 5196

  
5197 5197
--
5198
-- Name: plantusage_classsystem_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5198
-- Name: place_location_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5199 5199
--
5200 5200

  
5201
CREATE INDEX plantusage_classsystem_x ON plantusage USING btree (classsystem);
5201
CREATE INDEX place_location_id_x ON place USING btree (location_id);
5202 5202

  
5203 5203

  
5204 5204
--
5205
-- Name: plantusage_party_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5205
-- Name: place_namedplace_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5206 5206
--
5207 5207

  
5208
CREATE INDEX plantusage_party_id_x ON plantusage USING btree (party_id);
5208
CREATE INDEX place_namedplace_id_x ON place USING btree (namedplace_id);
5209 5209

  
5210 5210

  
5211 5211
--
5212
-- Name: plantusage_plantconcept_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5212
-- Name: plantconcept_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5213 5213
--
5214 5214

  
5215
CREATE INDEX plantusage_plantconcept_id_x ON plantusage USING btree (plantconcept_id);
5215
CREATE UNIQUE INDEX plantconcept_accessioncode_index ON plantconcept USING btree (accessioncode);
5216 5216

  
5217 5217

  
5218 5218
--
5219
-- Name: plantusage_plantname_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5219
-- Name: plantconcept_dobscount_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5220 5220
--
5221 5221

  
5222
CREATE INDEX plantusage_plantname_id_x ON plantusage USING btree (plantname_id);
5222
CREATE INDEX plantconcept_dobscount_x ON plantconcept USING btree (d_obscount);
5223 5223

  
5224 5224

  
5225 5225
--
5226
-- Name: plantusage_plantname_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5226
-- Name: plantconcept_plantname_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5227 5227
--
5228 5228

  
5229
CREATE INDEX plantusage_plantname_x ON plantusage USING btree (plantname);
5229
CREATE INDEX plantconcept_plantname_id_x ON plantconcept USING btree (plantname_id);
5230 5230

  
5231 5231

  
5232 5232
--
5233
-- Name: plantusage_plantstatus_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5233
-- Name: plantconcept_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5234 5234
--
5235 5235

  
5236
CREATE INDEX plantusage_plantstatus_id_x ON plantusage USING btree (plantstatus_id);
5236
CREATE INDEX plantconcept_reference_id_x ON plantconcept USING btree (reference_id);
5237 5237

  
5238 5238

  
5239 5239
--
5240
-- Name: plot_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5240
-- Name: plantcorrelation_plantconcept_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5241 5241
--
5242 5242

  
5243
CREATE UNIQUE INDEX plot_accessioncode_index ON plot USING btree (accessioncode);
5243
CREATE INDEX plantcorrelation_plantconcept_id_x ON plantcorrelation USING btree (plantconcept_id);
5244 5244

  
5245 5245

  
5246 5246
--
5247
-- Name: plot_parent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5247
-- Name: plantcorrelation_plantstatus_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5248 5248
--
5249 5249

  
5250
CREATE INDEX plot_parent_id_x ON plot USING btree (parent_id);
5250
CREATE INDEX plantcorrelation_plantstatus_id_x ON plantcorrelation USING btree (plantstatus_id);
5251 5251

  
5252 5252

  
5253 5253
--
5254
-- Name: plot_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5254
-- Name: plantlineage_childplantstatus_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5255 5255
--
5256 5256

  
5257
CREATE INDEX plot_reference_id_x ON plot USING btree (reference_id);
5257
CREATE INDEX plantlineage_childplantstatus_id_x ON plantlineage USING btree (childplantstatus_id);
5258 5258

  
5259 5259

  
5260 5260
--
5261
-- Name: plotevent_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5261
-- Name: plantlineage_parentplantstatus_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5262 5262
--
5263 5263

  
5264
CREATE UNIQUE INDEX plotevent_accessioncode_index ON plotevent USING btree (accessioncode);
5264
CREATE INDEX plantlineage_parentplantstatus_id_x ON plantlineage USING btree (parentplantstatus_id);
5265 5265

  
5266 5266

  
5267 5267
--
5268
-- Name: plotevent_covermethod_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5268
-- Name: plantname_plantname_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5269 5269
--
5270 5270

  
5271
CREATE INDEX plotevent_covermethod_id_x ON plotevent USING btree (covermethod_id);
5271
CREATE INDEX plantname_plantname_x ON plantname USING btree (plantname);
5272 5272

  
5273 5273

  
5274 5274
--
5275
-- Name: plotevent_plot_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5275
-- Name: plantname_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5276 5276
--
5277 5277

  
5278
CREATE INDEX plotevent_plot_id_x ON plotevent USING btree (plot_id);
5278
CREATE INDEX plantname_reference_id_x ON plantname USING btree (reference_id);
5279 5279

  
5280 5280

  
5281 5281
--
5282
-- Name: plotevent_previousobs_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5282
-- Name: plantstatus_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5283 5283
--
5284 5284

  
5285
CREATE INDEX plotevent_previousobs_id_x ON plotevent USING btree (previous_id);
5285
CREATE UNIQUE INDEX plantstatus_accessioncode_index ON plantstatus USING btree (accessioncode);
5286 5286

  
5287 5287

  
5288 5288
--
5289
-- Name: plotevent_project_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5289
-- Name: plantstatus_party_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5290 5290
--
5291 5291

  
5292
CREATE INDEX plotevent_project_id_x ON plotevent USING btree (project_id);
5292
CREATE INDEX plantstatus_party_id_x ON plantstatus USING btree (party_id);
5293 5293

  
5294 5294

  
5295 5295
--
5296
-- Name: plotevent_soiltaxon_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5296
-- Name: plantstatus_plantconcept_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5297 5297
--
5298 5298

  
5299
CREATE INDEX plotevent_soiltaxon_id_x ON plotevent USING btree (soiltaxon_id);
5299
CREATE INDEX plantstatus_plantconcept_id_x ON plantstatus USING btree (plantconcept_id);
5300 5300

  
5301 5301

  
5302 5302
--
5303
-- Name: plotevent_stratummethod_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5303
-- Name: plantstatus_plantlevel_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5304 5304
--
5305 5305

  
5306
CREATE INDEX plotevent_stratummethod_id_x ON plotevent USING btree (stratummethod_id);
5306
CREATE INDEX plantstatus_plantlevel_x ON plantstatus USING btree (plantlevel);
5307 5307

  
5308 5308

  
5309 5309
--
5310
-- Name: ploteventcontributor_party_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5310
-- Name: plantstatus_plantparent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5311 5311
--
5312 5312

  
5313
CREATE INDEX ploteventcontributor_party_id_x ON ploteventcontributor USING btree (party_id);
5313
CREATE INDEX plantstatus_plantparent_id_x ON plantstatus USING btree (plantparent_id);
5314 5314

  
5315 5315

  
5316 5316
--
5317
-- Name: ploteventcontributor_plotevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5317
-- Name: plantstatus_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5318 5318
--
5319 5319

  
5320
CREATE INDEX ploteventcontributor_plotevent_id_x ON ploteventcontributor USING btree (plotevent_id);
5320
CREATE INDEX plantstatus_reference_id_x ON plantstatus USING btree (reference_id);
5321 5321

  
5322 5322

  
5323 5323
--
5324
-- Name: ploteventcontributor_role_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5324
-- Name: plantusage_classsystem_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5325 5325
--
5326 5326

  
5327
CREATE INDEX ploteventcontributor_role_id_x ON ploteventcontributor USING btree (role_id);
5327
CREATE INDEX plantusage_classsystem_x ON plantusage USING btree (classsystem);
5328 5328

  
5329 5329

  
5330 5330
--
5331
-- Name: ploteventsynonym_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5331
-- Name: plantusage_party_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5332 5332
--
5333 5333

  
5334
CREATE UNIQUE INDEX ploteventsynonym_accessioncode_index ON ploteventsynonym USING btree (accessioncode);
5334
CREATE INDEX plantusage_party_id_x ON plantusage USING btree (party_id);
5335 5335

  
5336 5336

  
5337 5337
--
5338
-- Name: ploteventsynonym_party_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5338
-- Name: plantusage_plantconcept_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5339 5339
--
5340 5340

  
5341
CREATE INDEX ploteventsynonym_party_id_x ON ploteventsynonym USING btree (party_id);
5341
CREATE INDEX plantusage_plantconcept_id_x ON plantusage USING btree (plantconcept_id);
5342 5342

  
5343 5343

  
5344 5344
--
5345
-- Name: ploteventsynonym_primaryplotevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5345
-- Name: plantusage_plantname_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5346 5346
--
5347 5347

  
5348
CREATE INDEX ploteventsynonym_primaryplotevent_id_x ON ploteventsynonym USING btree (primaryplotevent_id);
5348
CREATE INDEX plantusage_plantname_id_x ON plantusage USING btree (plantname_id);
5349 5349

  
5350 5350

  
5351 5351
--
5352
-- Name: ploteventsynonym_role_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5352
-- Name: plantusage_plantname_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5353 5353
--
5354 5354

  
5355
CREATE INDEX ploteventsynonym_role_id_x ON ploteventsynonym USING btree (role_id);
5355
CREATE INDEX plantusage_plantname_x ON plantusage USING btree (plantname);
5356 5356

  
5357 5357

  
5358 5358
--
5359
-- Name: ploteventsynonym_synonymplotevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5359
-- Name: plantusage_plantstatus_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5360 5360
--
5361 5361

  
5362
CREATE INDEX ploteventsynonym_synonymplotevent_id_x ON ploteventsynonym USING btree (synonymplotevent_id);
5362
CREATE INDEX plantusage_plantstatus_id_x ON plantusage USING btree (plantstatus_id);
5363 5363

  
5364 5364

  
5365 5365
--
......
5454 5454

  
5455 5455

  
5456 5456
--
5457
-- Name: soilobs_plotevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5457
-- Name: soilobs_locationevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5458 5458
--
5459 5459

  
5460
CREATE INDEX soilobs_plotevent_id_x ON soilobs USING btree (plotevent_id);
5460
CREATE INDEX soilobs_locationevent_id_x ON soilobs USING btree (locationevent_id);
5461 5461

  
5462 5462

  
5463 5463
--
......
5482 5482

  
5483 5483

  
5484 5484
--
5485
-- Name: stratum_plotevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5485
-- Name: stratum_locationevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5486 5486
--
5487 5487

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff