SET standard_conforming_strings = off; SET escape_string_warning = off; -- MySQL dump 10.13 Distrib 5.5.28, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: salvias_plots -- ------------------------------------------------------ -- Server version 5.5.28-0ubuntu0.12.04.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; SET NAMES 'latin1'; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,POSTGRESQL' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table "PlotMetadata" -- DROP TABLE IF EXISTS "PlotMetadata"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "PlotMetadata" ( "PlotID" integer NOT NULL, "orig_filename" text, "AccessCode" integer DEFAULT NULL, "project_id" integer DEFAULT NULL, "PrimOwnerID" varchar(30) DEFAULT NULL, "SiteCode" varchar(100) DEFAULT NULL, "SiteName" varchar(150) DEFAULT NULL, "new_world" char(3) DEFAULT NULL, "MajorGeo" varchar(255) DEFAULT NULL, "Country" varchar(80) DEFAULT NULL, "PolDiv1" varchar(50) DEFAULT NULL, "pol1_type" varchar(25) DEFAULT NULL, "pol2" varchar(50) DEFAULT NULL, "pol2_type" varchar(25) DEFAULT NULL, "lat_string" varchar(100) DEFAULT NULL, "long_string" varchar(100) DEFAULT NULL, "LatDec" float DEFAULT NULL, "LongDec" float DEFAULT NULL, "lat_long_accuracy" varchar(255) DEFAULT NULL, "Elev" float DEFAULT NULL, "elev_max_m" float DEFAULT NULL, "elev_min_m" float DEFAULT NULL, "Precip" float DEFAULT NULL, "ElevSource" float DEFAULT NULL, "Temp" float DEFAULT NULL, "PrecipSource" float DEFAULT NULL, "TempSource" varchar(255) DEFAULT NULL, "bearing" double precision DEFAULT NULL, "slope_aspect" varchar(10) DEFAULT NULL, "slope_gradient" integer DEFAULT NULL, "clay_percent" float DEFAULT NULL, "silt_percent" float DEFAULT NULL, "sand_percent" float DEFAULT NULL, "pH" float DEFAULT NULL, "soil_N" varchar(20) DEFAULT NULL, "soil_P" varchar(20) DEFAULT NULL, "soil_C" varchar(20) DEFAULT NULL, "soil_K" varchar(20) DEFAULT NULL, "soil_Mg" varchar(20) DEFAULT NULL, "soil_Ca" varchar(20) DEFAULT NULL, "soil_Na" varchar(20) DEFAULT NULL, "soil_acidity" varchar(20) DEFAULT NULL, "soil_base" varchar(20) DEFAULT NULL, "soil_cation_cap" varchar(20) DEFAULT NULL, "soil_conductivity" varchar(20) DEFAULT NULL, "organic_percent" float DEFAULT NULL, "soil_texture" varchar(20) DEFAULT NULL, "RevisionComments" varchar(255) DEFAULT NULL, "Locality_Description" varchar(250) DEFAULT NULL, "topography_desc" varchar(250) DEFAULT NULL, "vegetation_1" varchar(255) DEFAULT NULL, "vegetation_2" varchar(255) DEFAULT NULL, "Habitat" varchar(250) DEFAULT NULL, "life_zone_code" varchar(10) DEFAULT NULL, "life_zone" varchar(150) DEFAULT NULL, "PlotMethod" varchar(250) DEFAULT NULL, "MethodCode" integer DEFAULT NULL, "plot_area_ha" float DEFAULT NULL, "recensused" char(3) DEFAULT NULL, "date_start" varchar(20) DEFAULT NULL, "date_finish" varchar(20) DEFAULT NULL, "plot_administrator" varchar(30) DEFAULT NULL, "plot_notes" text, "tmp_del" char(3) DEFAULT NULL, PRIMARY KEY ("PlotID"), /*KEY "Country" ("Country")*/CHECK (true), /*KEY "PrimOwnerID" ("PrimOwnerID")*/CHECK (true), /*KEY "plot_administrator" ("plot_administrator")*/CHECK (true), /*KEY "project_id" ("project_id")*/CHECK (true), /*KEY "tmp_del" ("tmp_del")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "PlotObservations" -- DROP TABLE IF EXISTS "PlotObservations"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "PlotObservations" ( "PlotObsID" integer NOT NULL, "PlotID" integer DEFAULT NULL, "PlotCode" varchar(50) DEFAULT NULL, "census_no" integer DEFAULT NULL, "census_date" varchar(20) DEFAULT NULL, "OrigRecordID" integer DEFAULT NULL, "Line" varchar(50) DEFAULT NULL, "Ind" integer DEFAULT NULL, "ind_id" varchar(11) DEFAULT NULL, "tag1" varchar(10) DEFAULT NULL, "tag2" varchar(10) DEFAULT NULL, "x_position" integer DEFAULT NULL, "y_position" integer DEFAULT NULL, "dist" double precision DEFAULT NULL, "perp_dist" varchar(5) DEFAULT NULL, "SourceVoucher" varchar(100) DEFAULT NULL, "coll_number" varchar(50) DEFAULT NULL, "collector_code" varchar(20) DEFAULT NULL, "coll_inits" varchar(8) DEFAULT NULL, "coll_lastname" varchar(50) DEFAULT NULL, "coll_firstname" varchar(50) DEFAULT NULL, "DetType" varchar(255) DEFAULT NULL, "det_by" varchar(250) DEFAULT NULL, "fam_status" integer DEFAULT NULL, "gen_status" integer DEFAULT NULL, "name_status" integer DEFAULT NULL, "SpAuthStatus" integer DEFAULT NULL, "Family" varchar(255) DEFAULT NULL, "Genus" varchar(255) DEFAULT NULL, "GenAuth" varchar(255) DEFAULT NULL, "Species" varchar(255) DEFAULT NULL, "auth" varchar(255) DEFAULT NULL, "infra_rank_1" varchar(6) DEFAULT NULL, "infra_ep_1" varchar(150) DEFAULT NULL, "infra_auth_1" varchar(150) DEFAULT NULL, "common_name" varchar(100) DEFAULT NULL, "morphoname" varchar(200) DEFAULT NULL, "species_code" varchar(50) DEFAULT NULL, "Habit" varchar(50) DEFAULT NULL, "height_class" varchar(20) DEFAULT NULL, "height_m" float DEFAULT NULL, "height_m_commercial" float DEFAULT NULL, "ht_first_branch_m" double precision DEFAULT NULL, "NoInd" integer DEFAULT NULL, "cover_percent" decimal(7,2) DEFAULT NULL, "intercept_cm" double precision DEFAULT NULL, "cfaff" varchar(10) DEFAULT NULL, "other_annotations" varchar(250) DEFAULT NULL, "morphocf" varchar(10) DEFAULT NULL, "IsMorpho" integer DEFAULT NULL, "OrigFamily" varchar(100) DEFAULT NULL, "OrigGenus" varchar(100) DEFAULT NULL, "OrigSpecies" varchar(255) DEFAULT NULL, "OrigAuth" varchar(250) DEFAULT NULL, "phenology" varchar(250) DEFAULT NULL, "canopy_position" varchar(50) DEFAULT NULL, "canopy_form" varchar(50) DEFAULT NULL, "liana_infestation" varchar(50) DEFAULT NULL, "Notes" text, "tmp_PlotObsID" integer DEFAULT NULL, "temp_dbh" double precision DEFAULT NULL, "temp_liandbh" double precision DEFAULT NULL, "tmp_del" char(3) DEFAULT NULL, PRIMARY KEY ("PlotObsID"), /*KEY "PlotID" ("PlotID")*/CHECK (true), /*KEY "tmp_del" ("tmp_del")*/CHECK (true), /*KEY "tmp_PlotObsID" ("tmp_PlotObsID")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "log_plot_download" -- DROP TABLE IF EXISTS "log_plot_download"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "log_plot_download" ( "EnteredBy" varchar(14) NOT NULL DEFAULT '', "download_timestamp" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, "ip" varchar(21) NOT NULL DEFAULT '', "plot_id" integer DEFAULT NULL, "plot_administrator" varchar(30) NOT NULL DEFAULT '', "project_id" integer NOT NULL DEFAULT '0', PRIMARY KEY ("EnteredBy","download_timestamp"), /*KEY "plot_administrator" ("plot_administrator","project_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "lookup_MethodCode" -- DROP TABLE IF EXISTS "lookup_MethodCode"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "lookup_MethodCode" ( "MethodCode" integer NOT NULL DEFAULT '0', "Description" varchar(80) NOT NULL DEFAULT '', PRIMARY KEY ("MethodCode") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "lookup_plot_security_levels" -- DROP TABLE IF EXISTS "lookup_plot_security_levels"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "lookup_plot_security_levels" ( "level" integer NOT NULL DEFAULT '0', "description" varchar(30) NOT NULL DEFAULT '', PRIMARY KEY ("level") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "permissions_plot_user" -- DROP TABLE IF EXISTS "permissions_plot_user"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "permissions_plot_user" ( "plot_id" integer NOT NULL DEFAULT '0', "username" varchar(50) NOT NULL DEFAULT '', "access_level" integer NOT NULL DEFAULT '0', PRIMARY KEY ("plot_id","username"), /*KEY "access_level" ("access_level")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "plotMetadata" -- DROP TABLE IF EXISTS "plotMetadata"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "plotMetadata" ( "PlotID" integer NOT NULL, "orig_filename" text, "AccessCode" integer DEFAULT NULL, "project_id" integer DEFAULT NULL, "PrimOwnerID" varchar(30) DEFAULT NULL, "SiteCode" varchar(100) DEFAULT NULL, "SiteName" varchar(150) DEFAULT NULL, "new_world" char(3) DEFAULT NULL, "MajorGeo" varchar(255) DEFAULT NULL, "Country" varchar(80) DEFAULT NULL, "PolDiv1" varchar(50) DEFAULT NULL, "pol1_type" varchar(25) DEFAULT NULL, "pol2" varchar(50) DEFAULT NULL, "pol2_type" varchar(25) DEFAULT NULL, "lat_string" varchar(20) DEFAULT NULL, "long_string" varchar(20) DEFAULT NULL, "LatDec" float DEFAULT NULL, "LongDec" float DEFAULT NULL, "lat_long_accuracy" varchar(255) DEFAULT NULL, "Elev" float DEFAULT NULL, "elev_max_m" float DEFAULT NULL, "elev_min_m" float DEFAULT NULL, "Precip" float DEFAULT NULL, "ElevSource" float DEFAULT NULL, "Temp" float DEFAULT NULL, "PrecipSource" float DEFAULT NULL, "TempSource" varchar(255) DEFAULT NULL, "bearing" double precision DEFAULT NULL, "slope_aspect" varchar(10) DEFAULT NULL, "slope_gradient" integer DEFAULT NULL, "clay_percent" float DEFAULT NULL, "silt_percent" float DEFAULT NULL, "sand_percent" float DEFAULT NULL, "pH" float DEFAULT NULL, "soil_N" varchar(20) DEFAULT NULL, "soil_P" varchar(20) DEFAULT NULL, "soil_C" varchar(20) DEFAULT NULL, "soil_K" varchar(20) DEFAULT NULL, "soil_Mg" varchar(20) DEFAULT NULL, "soil_Ca" varchar(20) DEFAULT NULL, "soil_Na" varchar(20) DEFAULT NULL, "soil_acidity" varchar(20) DEFAULT NULL, "soil_base" varchar(20) DEFAULT NULL, "soil_cation_cap" varchar(20) DEFAULT NULL, "soil_conductivity" varchar(20) DEFAULT NULL, "organic_percent" float DEFAULT NULL, "soil_texture" varchar(20) DEFAULT NULL, "RevisionComments" varchar(255) DEFAULT NULL, "Locality_Description" varchar(250) DEFAULT NULL, "topography_desc" varchar(250) DEFAULT NULL, "vegetation_1" varchar(255) DEFAULT NULL, "vegetation_2" varchar(255) DEFAULT NULL, "Habitat" varchar(250) DEFAULT NULL, "life_zone_code" varchar(10) DEFAULT NULL, "life_zone" varchar(150) DEFAULT NULL, "PlotMethod" varchar(250) DEFAULT NULL, "MethodCode" integer DEFAULT NULL, "plot_area_ha" float DEFAULT NULL, "recensused" char(3) DEFAULT NULL, "date_start" varchar(20) DEFAULT NULL, "date_finish" varchar(20) DEFAULT NULL, "plot_administrator" varchar(30) DEFAULT NULL, "plot_notes" text, "tmp_del" char(3) DEFAULT NULL, PRIMARY KEY ("PlotID"), /*KEY "Country" ("Country")*/CHECK (true), /*KEY "PrimOwnerID" ("PrimOwnerID")*/CHECK (true), /*KEY "plot_administrator" ("plot_administrator")*/CHECK (true), /*KEY "project_id" ("project_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "projects" -- DROP TABLE IF EXISTS "projects"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "projects" ( "project_id" integer NOT NULL, "project_name" varchar(255) NOT NULL DEFAULT '', "project_pi" varchar(30) NOT NULL DEFAULT '', "allow_download_all" integer NOT NULL DEFAULT '0', "ipr_specific" text, "ipr_specific_updated" date DEFAULT NULL, PRIMARY KEY ("project_id"), /*KEY "project_name" ("project_name")*/CHECK (true), /*KEY "on_project_list" ("allow_download_all")*/CHECK (true), /*KEY "project_distinct" ("project_id","project_name","project_pi")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "stems" -- DROP TABLE IF EXISTS "stems"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "stems" ( "stem_id" integer NOT NULL, "origrecord_id_stems" integer DEFAULT NULL, "PlotObsID" integer DEFAULT NULL, "NoInd" integer DEFAULT '0', "basal_diam" double precision DEFAULT NULL, "stem_dbh" double precision DEFAULT NULL, "gentry_dbh" double precision DEFAULT NULL, "stem_notes" text, "stem_tag1" varchar(20) DEFAULT NULL, "stem_tag2" varchar(20) DEFAULT NULL, "stem_height_m" double precision DEFAULT NULL, "stem_height_first_branch_m" double precision DEFAULT NULL, "stem_canopy_form" varchar(50) DEFAULT NULL, "stem_canopy_position" varchar(50) DEFAULT NULL, "stem_liana_infestation" varchar(50) DEFAULT NULL, "tmp_del" char(3) DEFAULT NULL, PRIMARY KEY ("stem_id"), /*KEY "plotobs_id" ("PlotObsID")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2012-11-14 15:48:54