Project

General

Profile

« Previous | Next » 

Revision 9971

schemas/vegbien.sql: re-ran `make schemas/public/reinstall; make schemas/remake` cycle, which apparently changed sort order of statements

View differences:

schemas/vegbien.my.sql
630 630

  
631 631

  
632 632
--
633
-- Name: analytical_stem; Type: TABLE; Schema: public; Owner: -; Tablespace: 
634
--
635

  
636
CREATE TABLE analytical_stem (
637
    datasource varchar(255) NOT NULL,
638
    `institutionCode` varchar(255),
639
    `collectionCode` varchar(255),
640
    `catalogNumber` varchar(255),
641
    `occurrenceID` varchar(255),
642
    country varchar(255),
643
    `stateProvince` varchar(255),
644
    county varchar(255),
645
    locality varchar(255),
646
    `decimalLatitude` double precision,
647
    `decimalLongitude` double precision,
648
    `coordinateUncertaintyInMeters` double precision,
649
    `coordinateSource_bien` varchar(255),
650
    `georeferenceProtocol_bien` varchar(255),
651
    geovalid_bien int(11),
652
    `isNewWorld_bien` int(11),
653
    `projectID` varchar(255),
654
    `locationID` varchar(255) NOT NULL,
655
    `locationName` varchar(255),
656
    subplot varchar(255),
657
    `individualCode` varchar(255),
658
    `elevationInMeters` double precision,
659
    `plotArea_ha` double precision,
660
    `samplingProtocol` varchar(255),
661
    `temperature_C` double precision,
662
    precipitation_m double precision,
663
    `recordedBy` varchar(255),
664
    `recordNumber` varchar(255),
665
    `dateCollected` date,
666
    family_verbatim varchar(255),
667
    `scientificName_verbatim` varchar(255),
668
    `identifiedBy` varchar(255),
669
    `dateIdentified` date,
670
    `identificationRemarks` varchar(255),
671
    family_matched varchar(255),
672
    `taxonName_matched` varchar(255),
673
    `scientificNameAuthorship_matched` varchar(255),
674
    `higherPlantGroup_bien` varchar(255),
675
    family varchar(255),
676
    genus varchar(255),
677
    `speciesBinomialWithMorphospecies` varchar(255),
678
    `taxonName` varchar(255),
679
    `scientificNameAuthorship` varchar(255),
680
    `growthForm` varchar(255),
681
    `reproductiveCondition` varchar(255),
682
    threatened_bien int(11),
683
    cultivated_bien int(11),
684
    `cultivatedBasis_bien` varchar(255),
685
    `occurrenceRemarks` varchar(255),
686
    `coverPercent` double precision,
687
    `diameterBreastHeight_cm` double precision,
688
    height_m double precision,
689
    tag varchar(255),
690
    `organismX_m` double precision,
691
    `organismY_m` double precision,
692
    `taxonOccurrenceID` varchar(255),
693
    `authorTaxonCode` varchar(255),
694
    `individualObservationID` varchar(255),
695
    `authorStemCode` varchar(255)
696
);
697

  
698

  
699
--
700
-- Name: provider_count; Type: TABLE; Schema: public; Owner: -; Tablespace: 
701
--
702

  
703
CREATE TABLE provider_count (
704
    dataprovider varchar(255) NOT NULL,
705
    dataset varchar(255) NOT NULL,
706
    records varchar(255),
707
    sourcetype varchar(255),
708
    observationtype varchar(255)
709
);
710

  
711

  
712
--
713
-- Name: taxon_trait; Type: TABLE; Schema: public; Owner: -; Tablespace: 
714
--
715

  
716
CREATE TABLE taxon_trait (
717
    `scientificName` varchar(255) NOT NULL,
718
    `measurementType` varchar(255) NOT NULL,
719
    `measurementValue` varchar(255),
720
    `measurementUnit` varchar(255)
721
);
722

  
723

  
724
--
725 633
-- Name: address; Type: TABLE; Schema: public; Owner: -; Tablespace: 
726 634
--
727 635

  
......
828 736

  
829 737

  
830 738
--
739
-- Name: analytical_stem; Type: TABLE; Schema: public; Owner: -; Tablespace: 
740
--
741

  
742
CREATE TABLE analytical_stem (
743
    datasource varchar(255) NOT NULL,
744
    `institutionCode` varchar(255),
745
    `collectionCode` varchar(255),
746
    `catalogNumber` varchar(255),
747
    `occurrenceID` varchar(255),
748
    country varchar(255),
749
    `stateProvince` varchar(255),
750
    county varchar(255),
751
    locality varchar(255),
752
    `decimalLatitude` double precision,
753
    `decimalLongitude` double precision,
754
    `coordinateUncertaintyInMeters` double precision,
755
    `coordinateSource_bien` varchar(255),
756
    `georeferenceProtocol_bien` varchar(255),
757
    geovalid_bien int(11),
758
    `isNewWorld_bien` int(11),
759
    `projectID` varchar(255),
760
    `locationID` varchar(255) NOT NULL,
761
    `locationName` varchar(255),
762
    subplot varchar(255),
763
    `individualCode` varchar(255),
764
    `elevationInMeters` double precision,
765
    `plotArea_ha` double precision,
766
    `samplingProtocol` varchar(255),
767
    `temperature_C` double precision,
768
    precipitation_m double precision,
769
    `recordedBy` varchar(255),
770
    `recordNumber` varchar(255),
771
    `dateCollected` date,
772
    family_verbatim varchar(255),
773
    `scientificName_verbatim` varchar(255),
774
    `identifiedBy` varchar(255),
775
    `dateIdentified` date,
776
    `identificationRemarks` varchar(255),
777
    family_matched varchar(255),
778
    `taxonName_matched` varchar(255),
779
    `scientificNameAuthorship_matched` varchar(255),
780
    `higherPlantGroup_bien` varchar(255),
781
    family varchar(255),
782
    genus varchar(255),
783
    `speciesBinomialWithMorphospecies` varchar(255),
784
    `taxonName` varchar(255),
785
    `scientificNameAuthorship` varchar(255),
786
    `growthForm` varchar(255),
787
    `reproductiveCondition` varchar(255),
788
    threatened_bien int(11),
789
    cultivated_bien int(11),
790
    `cultivatedBasis_bien` varchar(255),
791
    `occurrenceRemarks` varchar(255),
792
    `coverPercent` double precision,
793
    `diameterBreastHeight_cm` double precision,
794
    height_m double precision,
795
    tag varchar(255),
796
    `organismX_m` double precision,
797
    `organismY_m` double precision,
798
    `taxonOccurrenceID` varchar(255),
799
    `authorTaxonCode` varchar(255),
800
    `individualObservationID` varchar(255),
801
    `authorStemCode` varchar(255)
802
);
803

  
804

  
805
--
831 806
-- Name: analytical_plot; Type: VIEW; Schema: public; Owner: -
832 807
--
833 808

  
......
2703 2678

  
2704 2679

  
2705 2680
--
2681
-- Name: provider_count; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2682
--
2683

  
2684
CREATE TABLE provider_count (
2685
    dataprovider varchar(255) NOT NULL,
2686
    dataset varchar(255) NOT NULL,
2687
    records varchar(255),
2688
    sourcetype varchar(255),
2689
    observationtype varchar(255)
2690
);
2691

  
2692

  
2693
--
2706 2694
-- Name: sourcename; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2707 2695
--
2708 2696

  
......
3035 3023

  
3036 3024

  
3037 3025
--
3026
-- Name: taxon_trait; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3027
--
3028

  
3029
CREATE TABLE taxon_trait (
3030
    `scientificName` varchar(255) NOT NULL,
3031
    `measurementType` varchar(255) NOT NULL,
3032
    `measurementValue` varchar(255),
3033
    `measurementUnit` varchar(255)
3034
);
3035

  
3036

  
3037
--
3038 3038
-- Name: trait; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3039 3039
--
3040 3040

  
......
7166 7166

  
7167 7167

  
7168 7168
--
7169
-- Name: analytical_stem; Type: ACL; Schema: public; Owner: -
7169
-- Name: address; Type: ACL; Schema: public; Owner: -
7170 7170
--
7171 7171

  
7172 7172

  
......
7176 7176

  
7177 7177

  
7178 7178
--
7179
-- Name: provider_count; Type: ACL; Schema: public; Owner: -
7179
-- Name: aggregateoccurrence; Type: ACL; Schema: public; Owner: -
7180 7180
--
7181 7181

  
7182 7182

  
......
7185 7185

  
7186 7186

  
7187 7187

  
7188

  
7189 7188
--
7190
-- Name: taxon_trait; Type: ACL; Schema: public; Owner: -
7189
-- Name: analytical_stem; Type: ACL; Schema: public; Owner: -
7191 7190
--
7192 7191

  
7193 7192

  
......
7197 7196

  
7198 7197

  
7199 7198
--
7200
-- Name: address; Type: ACL; Schema: public; Owner: -
7201
--
7202

  
7203

  
7204

  
7205

  
7206

  
7207

  
7208

  
7209
--
7210
-- Name: aggregateoccurrence; Type: ACL; Schema: public; Owner: -
7211
--
7212

  
7213

  
7214

  
7215

  
7216

  
7217

  
7218

  
7219
--
7220 7199
-- Name: analytical_plot; Type: ACL; Schema: public; Owner: -
7221 7200
--
7222 7201

  
......
7720 7699

  
7721 7700

  
7722 7701
--
7702
-- Name: provider_count; Type: ACL; Schema: public; Owner: -
7703
--
7704

  
7705

  
7706

  
7707

  
7708

  
7709

  
7710

  
7711

  
7712
--
7723 7713
-- Name: sourcename; Type: ACL; Schema: public; Owner: -
7724 7714
--
7725 7715

  
......
7812 7802

  
7813 7803

  
7814 7804
--
7805
-- Name: taxon_trait; Type: ACL; Schema: public; Owner: -
7806
--
7807

  
7808

  
7809

  
7810

  
7811

  
7812

  
7813

  
7814
--
7815 7815
-- Name: trait; Type: ACL; Schema: public; Owner: -
7816 7816
--
7817 7817

  
schemas/vegbien.sql
1496 1496

  
1497 1497

  
1498 1498
--
1499
-- Name: analytical_stem; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1500
--
1501

  
1502
CREATE TABLE analytical_stem (
1503
    datasource text NOT NULL,
1504
    "institutionCode" text,
1505
    "collectionCode" text,
1506
    "catalogNumber" text,
1507
    "occurrenceID" text,
1508
    country text,
1509
    "stateProvince" text,
1510
    county text,
1511
    locality text,
1512
    "decimalLatitude" double precision,
1513
    "decimalLongitude" double precision,
1514
    "coordinateUncertaintyInMeters" double precision,
1515
    "coordinateSource_bien" coordinatesource,
1516
    "georeferenceProtocol_bien" text,
1517
    geovalid_bien integer,
1518
    "isNewWorld_bien" integer,
1519
    "projectID" text,
1520
    "locationID" text NOT NULL,
1521
    "locationName" text,
1522
    subplot text,
1523
    "individualCode" text,
1524
    "elevationInMeters" double precision,
1525
    "plotArea_ha" double precision,
1526
    "samplingProtocol" text,
1527
    "temperature_C" double precision,
1528
    precipitation_m double precision,
1529
    "recordedBy" text,
1530
    "recordNumber" text,
1531
    "dateCollected" date,
1532
    family_verbatim text,
1533
    "scientificName_verbatim" text,
1534
    "identifiedBy" text,
1535
    "dateIdentified" date,
1536
    "identificationRemarks" text,
1537
    family_matched text,
1538
    "taxonName_matched" text,
1539
    "scientificNameAuthorship_matched" text,
1540
    "higherPlantGroup_bien" higher_plant_group,
1541
    family text,
1542
    genus text,
1543
    "speciesBinomialWithMorphospecies" text,
1544
    "taxonName" text,
1545
    "scientificNameAuthorship" text,
1546
    "growthForm" growthform,
1547
    "reproductiveCondition" text,
1548
    threatened_bien integer,
1549
    cultivated_bien integer,
1550
    "cultivatedBasis_bien" text,
1551
    "occurrenceRemarks" text,
1552
    "coverPercent" double precision,
1553
    "diameterBreastHeight_cm" double precision,
1554
    height_m double precision,
1555
    tag text,
1556
    "organismX_m" double precision,
1557
    "organismY_m" double precision,
1558
    "taxonOccurrenceID" text,
1559
    "authorTaxonCode" text,
1560
    "individualObservationID" text,
1561
    "authorStemCode" text
1562
);
1563

  
1564

  
1565
--
1566
-- Name: provider_count; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1567
--
1568

  
1569
CREATE TABLE provider_count (
1570
    dataprovider text NOT NULL,
1571
    dataset text NOT NULL,
1572
    records bigint,
1573
    sourcetype sourcetype,
1574
    observationtype observationtype
1575
);
1576

  
1577

  
1578
--
1579
-- Name: taxon_trait; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1580
--
1581

  
1582
CREATE TABLE taxon_trait (
1583
    "scientificName" text NOT NULL,
1584
    "measurementType" text NOT NULL,
1585
    "measurementValue" text,
1586
    "measurementUnit" text
1587
);
1588

  
1589

  
1590
--
1591 1499
-- Name: address; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1592 1500
--
1593 1501

  
......
1705 1613

  
1706 1614

  
1707 1615
--
1616
-- Name: analytical_stem; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1617
--
1618

  
1619
CREATE TABLE analytical_stem (
1620
    datasource text NOT NULL,
1621
    "institutionCode" text,
1622
    "collectionCode" text,
1623
    "catalogNumber" text,
1624
    "occurrenceID" text,
1625
    country text,
1626
    "stateProvince" text,
1627
    county text,
1628
    locality text,
1629
    "decimalLatitude" double precision,
1630
    "decimalLongitude" double precision,
1631
    "coordinateUncertaintyInMeters" double precision,
1632
    "coordinateSource_bien" coordinatesource,
1633
    "georeferenceProtocol_bien" text,
1634
    geovalid_bien integer,
1635
    "isNewWorld_bien" integer,
1636
    "projectID" text,
1637
    "locationID" text NOT NULL,
1638
    "locationName" text,
1639
    subplot text,
1640
    "individualCode" text,
1641
    "elevationInMeters" double precision,
1642
    "plotArea_ha" double precision,
1643
    "samplingProtocol" text,
1644
    "temperature_C" double precision,
1645
    precipitation_m double precision,
1646
    "recordedBy" text,
1647
    "recordNumber" text,
1648
    "dateCollected" date,
1649
    family_verbatim text,
1650
    "scientificName_verbatim" text,
1651
    "identifiedBy" text,
1652
    "dateIdentified" date,
1653
    "identificationRemarks" text,
1654
    family_matched text,
1655
    "taxonName_matched" text,
1656
    "scientificNameAuthorship_matched" text,
1657
    "higherPlantGroup_bien" higher_plant_group,
1658
    family text,
1659
    genus text,
1660
    "speciesBinomialWithMorphospecies" text,
1661
    "taxonName" text,
1662
    "scientificNameAuthorship" text,
1663
    "growthForm" growthform,
1664
    "reproductiveCondition" text,
1665
    threatened_bien integer,
1666
    cultivated_bien integer,
1667
    "cultivatedBasis_bien" text,
1668
    "occurrenceRemarks" text,
1669
    "coverPercent" double precision,
1670
    "diameterBreastHeight_cm" double precision,
1671
    height_m double precision,
1672
    tag text,
1673
    "organismX_m" double precision,
1674
    "organismY_m" double precision,
1675
    "taxonOccurrenceID" text,
1676
    "authorTaxonCode" text,
1677
    "individualObservationID" text,
1678
    "authorStemCode" text
1679
);
1680

  
1681

  
1682
--
1708 1683
-- Name: analytical_plot; Type: VIEW; Schema: public; Owner: -
1709 1684
--
1710 1685

  
......
3795 3770

  
3796 3771

  
3797 3772
--
3773
-- Name: provider_count; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3774
--
3775

  
3776
CREATE TABLE provider_count (
3777
    dataprovider text NOT NULL,
3778
    dataset text NOT NULL,
3779
    records bigint,
3780
    sourcetype sourcetype,
3781
    observationtype observationtype
3782
);
3783

  
3784

  
3785
--
3798 3786
-- Name: sourcename; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3799 3787
--
3800 3788

  
......
4179 4167

  
4180 4168

  
4181 4169
--
4170
-- Name: taxon_trait; Type: TABLE; Schema: public; Owner: -; Tablespace: 
4171
--
4172

  
4173
CREATE TABLE taxon_trait (
4174
    "scientificName" text NOT NULL,
4175
    "measurementType" text NOT NULL,
4176
    "measurementValue" text,
4177
    "measurementUnit" text
4178
);
4179

  
4180

  
4181
--
4182 4182
-- Name: trait; Type: TABLE; Schema: public; Owner: -; Tablespace: 
4183 4183
--
4184 4184

  
......
8431 8431

  
8432 8432

  
8433 8433
--
8434
-- Name: analytical_stem; Type: ACL; Schema: public; Owner: -
8435
--
8436

  
8437
REVOKE ALL ON TABLE analytical_stem FROM PUBLIC;
8438
REVOKE ALL ON TABLE analytical_stem FROM bien;
8439
GRANT ALL ON TABLE analytical_stem TO bien;
8440
GRANT SELECT ON TABLE analytical_stem TO bien_read;
8441

  
8442

  
8443
--
8444
-- Name: provider_count; Type: ACL; Schema: public; Owner: -
8445
--
8446

  
8447
REVOKE ALL ON TABLE provider_count FROM PUBLIC;
8448
REVOKE ALL ON TABLE provider_count FROM bien;
8449
GRANT ALL ON TABLE provider_count TO bien;
8450
GRANT SELECT ON TABLE provider_count TO bien_read;
8451
GRANT SELECT ON TABLE provider_count TO public_;
8452

  
8453

  
8454
--
8455
-- Name: taxon_trait; Type: ACL; Schema: public; Owner: -
8456
--
8457

  
8458
REVOKE ALL ON TABLE taxon_trait FROM PUBLIC;
8459
REVOKE ALL ON TABLE taxon_trait FROM bien;
8460
GRANT ALL ON TABLE taxon_trait TO bien;
8461
GRANT SELECT ON TABLE taxon_trait TO bien_read;
8462

  
8463

  
8464
--
8465 8434
-- Name: address; Type: ACL; Schema: public; Owner: -
8466 8435
--
8467 8436

  
......
8482 8451

  
8483 8452

  
8484 8453
--
8454
-- Name: analytical_stem; Type: ACL; Schema: public; Owner: -
8455
--
8456

  
8457
REVOKE ALL ON TABLE analytical_stem FROM PUBLIC;
8458
REVOKE ALL ON TABLE analytical_stem FROM bien;
8459
GRANT ALL ON TABLE analytical_stem TO bien;
8460
GRANT SELECT ON TABLE analytical_stem TO bien_read;
8461

  
8462

  
8463
--
8485 8464
-- Name: analytical_plot; Type: ACL; Schema: public; Owner: -
8486 8465
--
8487 8466

  
......
8985 8964

  
8986 8965

  
8987 8966
--
8967
-- Name: provider_count; Type: ACL; Schema: public; Owner: -
8968
--
8969

  
8970
REVOKE ALL ON TABLE provider_count FROM PUBLIC;
8971
REVOKE ALL ON TABLE provider_count FROM bien;
8972
GRANT ALL ON TABLE provider_count TO bien;
8973
GRANT SELECT ON TABLE provider_count TO bien_read;
8974
GRANT SELECT ON TABLE provider_count TO public_;
8975

  
8976

  
8977
--
8988 8978
-- Name: sourcename; Type: ACL; Schema: public; Owner: -
8989 8979
--
8990 8980

  
......
9077 9067

  
9078 9068

  
9079 9069
--
9070
-- Name: taxon_trait; Type: ACL; Schema: public; Owner: -
9071
--
9072

  
9073
REVOKE ALL ON TABLE taxon_trait FROM PUBLIC;
9074
REVOKE ALL ON TABLE taxon_trait FROM bien;
9075
GRANT ALL ON TABLE taxon_trait TO bien;
9076
GRANT SELECT ON TABLE taxon_trait TO bien_read;
9077

  
9078

  
9079
--
9080 9080
-- Name: trait; Type: ACL; Schema: public; Owner: -
9081 9081
--
9082 9082

  

Also available in: Unified diff