SET standard_conforming_strings = off; SET escape_string_warning = off; -- MySQL dump 10.13 Distrib 5.5.29, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: GBIF -- ------------------------------------------------------ -- Server version 5.5.29-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 "QRTZ_BLOB_TRIGGERS" -- DROP TABLE IF EXISTS "QRTZ_BLOB_TRIGGERS"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "QRTZ_BLOB_TRIGGERS" ( "trigger_name" varchar(100) NOT NULL, "trigger_group" varchar(100) NOT NULL, "blob_data" bytea, PRIMARY KEY ("trigger_name","trigger_group") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "QRTZ_CALENDARS" -- DROP TABLE IF EXISTS "QRTZ_CALENDARS"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "QRTZ_CALENDARS" ( "calendar_name" varchar(255) NOT NULL, "calendar" bytea NOT NULL, PRIMARY KEY ("calendar_name") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "QRTZ_CRON_TRIGGERS" -- DROP TABLE IF EXISTS "QRTZ_CRON_TRIGGERS"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "QRTZ_CRON_TRIGGERS" ( "trigger_name" varchar(100) NOT NULL, "trigger_group" varchar(100) NOT NULL, "cron_expression" varchar(255) NOT NULL, "time_zone_id" varchar(255) DEFAULT NULL, PRIMARY KEY ("trigger_name","trigger_group") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "QRTZ_FIRED_TRIGGERS" -- DROP TABLE IF EXISTS "QRTZ_FIRED_TRIGGERS"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "QRTZ_FIRED_TRIGGERS" ( "entry_id" varchar(95) NOT NULL, "trigger_name" varchar(100) NOT NULL, "trigger_group" varchar(100) NOT NULL, "is_volatile" varchar(1) NOT NULL, "instance_name" varchar(255) NOT NULL, "fired_time" bigint NOT NULL, "priority" integer NOT NULL, "state" varchar(16) NOT NULL, "job_name" varchar(100) DEFAULT NULL, "job_group" varchar(100) DEFAULT NULL, "is_stateful" varchar(1) DEFAULT NULL, "requests_recovery" varchar(1) DEFAULT NULL, PRIMARY KEY ("entry_id") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "QRTZ_JOB_DETAILS" -- DROP TABLE IF EXISTS "QRTZ_JOB_DETAILS"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "QRTZ_JOB_DETAILS" ( "job_name" varchar(100) NOT NULL, "job_group" varchar(100) NOT NULL, "description" varchar(255) DEFAULT NULL, "job_class_name" varchar(128) NOT NULL, "is_durable" varchar(1) NOT NULL, "is_volatile" varchar(1) NOT NULL, "is_stateful" varchar(1) NOT NULL, "requests_recovery" varchar(1) NOT NULL, "job_data" bytea, PRIMARY KEY ("job_name","job_group") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "QRTZ_JOB_LISTENERS" -- DROP TABLE IF EXISTS "QRTZ_JOB_LISTENERS"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "QRTZ_JOB_LISTENERS" ( "job_name" varchar(100) NOT NULL, "job_group" varchar(100) NOT NULL, "job_listener" varchar(100) NOT NULL, PRIMARY KEY ("job_name","job_group","job_listener") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "QRTZ_LOCKS" -- DROP TABLE IF EXISTS "QRTZ_LOCKS"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "QRTZ_LOCKS" ( "lock_name" varchar(40) NOT NULL, PRIMARY KEY ("lock_name") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "QRTZ_PAUSED_TRIGGER_GRPS" -- DROP TABLE IF EXISTS "QRTZ_PAUSED_TRIGGER_GRPS"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "QRTZ_PAUSED_TRIGGER_GRPS" ( "trigger_group" varchar(100) NOT NULL, PRIMARY KEY ("trigger_group") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "QRTZ_SCHEDULER_STATE" -- DROP TABLE IF EXISTS "QRTZ_SCHEDULER_STATE"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "QRTZ_SCHEDULER_STATE" ( "instance_name" varchar(255) NOT NULL, "last_checkin_time" bigint NOT NULL, "checkin_interval" bigint NOT NULL, PRIMARY KEY ("instance_name") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "QRTZ_SIMPLE_TRIGGERS" -- DROP TABLE IF EXISTS "QRTZ_SIMPLE_TRIGGERS"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "QRTZ_SIMPLE_TRIGGERS" ( "trigger_name" varchar(100) NOT NULL, "trigger_group" varchar(100) NOT NULL, "repeat_count" bigint NOT NULL, "repeat_interval" bigint NOT NULL, "times_triggered" bigint NOT NULL, PRIMARY KEY ("trigger_name","trigger_group") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "QRTZ_TRIGGERS" -- DROP TABLE IF EXISTS "QRTZ_TRIGGERS"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "QRTZ_TRIGGERS" ( "trigger_name" varchar(100) NOT NULL, "trigger_group" varchar(100) NOT NULL, "job_name" varchar(100) NOT NULL, "job_group" varchar(100) NOT NULL, "is_volatile" varchar(1) NOT NULL, "description" varchar(255) DEFAULT NULL, "next_fire_time" bigint DEFAULT NULL, "prev_fire_time" bigint DEFAULT NULL, "priority" integer DEFAULT NULL, "trigger_state" varchar(16) NOT NULL, "trigger_type" varchar(8) NOT NULL, "start_time" bigint NOT NULL, "end_time" bigint DEFAULT NULL, "calendar_name" varchar(255) DEFAULT NULL, "misfire_instr" integer DEFAULT NULL, "job_data" bytea, PRIMARY KEY ("trigger_name","trigger_group"), /*KEY "job_name" ("job_name","job_group")*/CHECK (true), /*KEY "ix_qrtz_nft" ("next_fire_time")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "QRTZ_TRIGGER_LISTENERS" -- DROP TABLE IF EXISTS "QRTZ_TRIGGER_LISTENERS"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "QRTZ_TRIGGER_LISTENERS" ( "trigger_name" varchar(100) NOT NULL, "trigger_group" varchar(100) NOT NULL, "trigger_listener" varchar(100) NOT NULL, PRIMARY KEY ("trigger_name","trigger_group","trigger_listener") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "agent" -- DROP TABLE IF EXISTS "agent"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "agent" ( "id" integer NOT NULL, "name" varchar(255) NOT NULL, "address" varchar(255) DEFAULT NULL, "email" varchar(255) DEFAULT NULL, "telephone" varchar(255) DEFAULT NULL, "created" timestamp DEFAULT NULL, "modified" timestamp DEFAULT NULL, "deleted" timestamp DEFAULT NULL, PRIMARY KEY ("id") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "backup_data_provider_nov15_kyle" -- DROP TABLE IF EXISTS "backup_data_provider_nov15_kyle"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "backup_data_provider_nov15_kyle" ( "id" integer NOT NULL, "name" varchar(255) DEFAULT NULL, "description" text, "address" varchar(255) DEFAULT NULL, "city" varchar(255) DEFAULT NULL, "at_latitude" float DEFAULT NULL, "at_longitude" float DEFAULT NULL, "website_url" varchar(255) DEFAULT NULL, "logo_url" varchar(255) DEFAULT NULL, "email" varchar(255) DEFAULT NULL, "telephone" varchar(255) DEFAULT NULL, "uuid" char(50) DEFAULT NULL, "concept_count" integer DEFAULT '0', "higher_concept_count" integer DEFAULT '0', "species_count" integer DEFAULT '0', "occurrence_count" integer DEFAULT '0', "occurrence_coordinate_count" integer DEFAULT '0', "created" timestamp DEFAULT NULL, "modified" timestamp DEFAULT NULL, "deleted" timestamp DEFAULT NULL, "iso_country_code" char(2) DEFAULT NULL, "stated_count_served" integer DEFAULT NULL, "gbif_approver" varchar(255) DEFAULT NULL, "lock_description" integer NOT NULL DEFAULT '0', "lock_iso_country_code" integer NOT NULL DEFAULT '0', "data_resource_count" integer DEFAULT '0', PRIMARY KEY ("id"), /*KEY "IX_data_provider_name" ("name")*/CHECK (true), /*KEY "IX_data_provider_country" ("iso_country_code")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "backup_data_resource_nov15_kyle" -- DROP TABLE IF EXISTS "backup_data_resource_nov15_kyle"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "backup_data_resource_nov15_kyle" ( "id" integer NOT NULL, "data_provider_id" integer NOT NULL, "name" varchar(255) DEFAULT NULL, "display_name" varchar(255) DEFAULT NULL, "description" text, "rights" text, "citation" text, "logo_url" varchar(255) DEFAULT NULL, "shared_taxonomy" integer DEFAULT '0', "concept_count" integer DEFAULT '0', "higher_concept_count" integer DEFAULT '0', "species_count" integer DEFAULT '0', "occurrence_count" integer DEFAULT '0', "occurrence_coordinate_count" integer DEFAULT '0', "basis_of_record" integer NOT NULL DEFAULT '0', "created" timestamp DEFAULT NULL, "modified" timestamp DEFAULT NULL, "deleted" timestamp DEFAULT NULL, "citable_agent" varchar(255) DEFAULT NULL, "root_taxon_rank" integer DEFAULT NULL, "root_taxon_name" varchar(150) DEFAULT NULL, "scope_continent_code" char(2) DEFAULT NULL, "scope_country_code" char(2) DEFAULT NULL, "provider_record_count" integer DEFAULT NULL, "taxonomic_priority" integer NOT NULL DEFAULT '100', "website_url" varchar(255) DEFAULT NULL, "occurrence_clean_geospatial_count" integer DEFAULT NULL, "lock_display_name" integer NOT NULL DEFAULT '0', "lock_citable_agent" integer NOT NULL DEFAULT '0', "lock_basis_of_record" integer NOT NULL DEFAULT '0', "override_citation" integer NOT NULL DEFAULT '0', "gbif_registry_uuid" char(50) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "data_provider_id" ("data_provider_id")*/CHECK (true), /*KEY "IX_data_resource_name" ("name")*/CHECK (true), /*KEY "IX_data_resource_display_name" ("display_name")*/CHECK (true), /*KEY "IX_data_resource_shared_taxonomy" ("shared_taxonomy")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "bi_relation_tag" -- DROP TABLE IF EXISTS "bi_relation_tag"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "bi_relation_tag" ( "id" integer NOT NULL, "tag_id" integer DEFAULT NULL, "to_entity_id" integer DEFAULT NULL, "from_entity_id" integer DEFAULT NULL, "count" integer DEFAULT NULL, "is_system_generated" bit(1) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "tag_id" ("tag_id")*/CHECK (true), /*KEY "ix_bi_relation_tag_tag_id" ("tag_id")*/CHECK (true), /*KEY "ix_bi_relation_tag_tag_id_to_entity_id" ("tag_id","to_entity_id")*/CHECK (true), /*KEY "ix_bi_relation_tag_tag_id_from_entity_id" ("tag_id","from_entity_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "boolean_tag" -- DROP TABLE IF EXISTS "boolean_tag"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "boolean_tag" ( "id" integer NOT NULL, "tag_id" integer DEFAULT NULL, "entity_id" integer DEFAULT NULL, "is_true" integer DEFAULT '0', "is_system_generated" bit(1) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "tag_id" ("tag_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "catalogue_number" -- DROP TABLE IF EXISTS "catalogue_number"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "catalogue_number" ( "id" integer NOT NULL, "code" varchar(255) NOT NULL, PRIMARY KEY ("id"), /*KEY "ix_cn_catalogue_number" ("code")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "cell_country" -- DROP TABLE IF EXISTS "cell_country"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "cell_country" ( "cell_id" integer NOT NULL, "iso_country_code" char(2) NOT NULL, PRIMARY KEY ("cell_id","iso_country_code"), /*KEY "IX_cell_ids" ("cell_id")*/CHECK (true), /*KEY "IX_iso_country_codes" ("iso_country_code")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "cell_density" -- DROP TABLE IF EXISTS "cell_density"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "cell_density" ( "type" integer NOT NULL, "entity_id" integer NOT NULL, "cell_id" integer NOT NULL, "count" integer DEFAULT NULL, PRIMARY KEY ("type","entity_id","cell_id") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "centi_cell_density" -- DROP TABLE IF EXISTS "centi_cell_density"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "centi_cell_density" ( "type" integer NOT NULL, "entity_id" integer NOT NULL, "cell_id" integer NOT NULL, "centi_cell_id" integer NOT NULL, "count" integer DEFAULT NULL, PRIMARY KEY ("type","entity_id","cell_id","centi_cell_id") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "collection_code" -- DROP TABLE IF EXISTS "collection_code"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "collection_code" ( "id" integer NOT NULL, "code" varchar(255) NOT NULL, PRIMARY KEY ("id"), /*KEY "ix_cc_collection_code" ("code")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "common_name" -- DROP TABLE IF EXISTS "common_name"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "common_name" ( "id" integer NOT NULL, "taxon_concept_id" integer DEFAULT NULL, "name" varchar(255) NOT NULL, "iso_language_code" char(2) DEFAULT NULL, "language" varchar(255) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "taxon_concept_id" ("taxon_concept_id")*/CHECK (true), /*KEY "IX_common_name_1" ("name"(50))*/CHECK (true), /*KEY "IX_common_name_2" ("iso_language_code")*/CHECK (true), /*KEY "IX_common_name_3" ("language"(100))*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "common_name_orig" -- DROP TABLE IF EXISTS "common_name_orig"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "common_name_orig" ( "id" integer NOT NULL, "taxon_concept_id" integer DEFAULT NULL, "name" varchar(255) NOT NULL, "iso_language_code" char(2) DEFAULT NULL, "language" varchar(255) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "taxon_concept_id" ("taxon_concept_id")*/CHECK (true), /*KEY "IX_common_name_1" ("name")*/CHECK (true), /*KEY "IX_common_name_2" ("iso_language_code")*/CHECK (true), /*KEY "IX_common_name_3" ("language")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "country" -- DROP TABLE IF EXISTS "country"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "country" ( "id" integer NOT NULL, "iso_country_code" char(2) DEFAULT NULL, "concept_count" integer DEFAULT '0', "species_count" integer DEFAULT '0', "occurrence_count" integer DEFAULT '0', "occurrence_coordinate_count" integer DEFAULT '0', "continent_code" text CHECK ("continent_code" in ('AF','AS','EU','NA','OC','SA','AN')) DEFAULT NULL, "region" char(3) DEFAULT NULL, "min_latitude" float DEFAULT NULL, "max_latitude" float DEFAULT NULL, "min_longitude" float DEFAULT NULL, "max_longitude" float DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "IX_country_iso_country_code" ("iso_country_code")*/CHECK (true), /*KEY "IX_country_continent_code" ("continent_code")*/CHECK (true), /*KEY "IX_country_region" ("region")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "country_name" -- DROP TABLE IF EXISTS "country_name"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "country_name" ( "id" integer NOT NULL, "country_id" integer DEFAULT NULL, "name" varchar(255) DEFAULT NULL, "searchable_name" varchar(255) DEFAULT NULL, "iso_country_code" char(2) DEFAULT NULL, "locale" char(2) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "country_id" ("country_id")*/CHECK (true), /*KEY "IX_country_name_name" ("name")*/CHECK (true), /*KEY "IX_country_name_searchable_name" ("searchable_name")*/CHECK (true), /*KEY "IX_country_name_iso_country_code" ("iso_country_code")*/CHECK (true), /*KEY "IX_country_name_locale" ("locale")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "data_provider" -- DROP TABLE IF EXISTS "data_provider"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "data_provider" ( "id" integer NOT NULL, "name" varchar(255) DEFAULT NULL, "description" text, "address" varchar(255) DEFAULT NULL, "city" varchar(255) DEFAULT NULL, "at_latitude" float DEFAULT NULL, "at_longitude" float DEFAULT NULL, "website_url" varchar(255) DEFAULT NULL, "logo_url" varchar(255) DEFAULT NULL, "email" varchar(255) DEFAULT NULL, "telephone" varchar(255) DEFAULT NULL, "uuid" char(50) DEFAULT NULL, "concept_count" integer DEFAULT '0', "higher_concept_count" integer DEFAULT '0', "species_count" integer DEFAULT '0', "occurrence_count" integer DEFAULT '0', "occurrence_coordinate_count" integer DEFAULT '0', "created" timestamp DEFAULT NULL, "modified" timestamp DEFAULT NULL, "deleted" timestamp DEFAULT NULL, "iso_country_code" char(2) DEFAULT NULL, "stated_count_served" integer DEFAULT NULL, "gbif_approver" varchar(255) DEFAULT NULL, "lock_description" integer NOT NULL DEFAULT '0', "lock_iso_country_code" integer NOT NULL DEFAULT '0', "data_resource_count" integer DEFAULT '0', PRIMARY KEY ("id"), /*KEY "IX_data_provider_name" ("name")*/CHECK (true), /*KEY "IX_data_provider_country" ("iso_country_code")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "data_provider_agent" -- DROP TABLE IF EXISTS "data_provider_agent"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "data_provider_agent" ( "id" integer NOT NULL, "data_provider_id" integer NOT NULL, "agent_id" integer NOT NULL, "agent_type" integer NOT NULL, PRIMARY KEY ("id"), /*KEY "data_provider_id" ("data_provider_id")*/CHECK (true), /*KEY "agent_id" ("agent_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "data_resource" -- DROP TABLE IF EXISTS "data_resource"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "data_resource" ( "id" integer NOT NULL, "data_provider_id" integer NOT NULL, "name" varchar(255) DEFAULT NULL, "display_name" varchar(255) DEFAULT NULL, "description" text, "rights" text, "citation" text, "logo_url" varchar(255) DEFAULT NULL, "shared_taxonomy" integer DEFAULT '0', "concept_count" integer DEFAULT '0', "higher_concept_count" integer DEFAULT '0', "species_count" integer DEFAULT '0', "occurrence_count" integer DEFAULT '0', "occurrence_coordinate_count" integer DEFAULT '0', "basis_of_record" integer NOT NULL DEFAULT '0', "created" timestamp DEFAULT NULL, "modified" timestamp DEFAULT NULL, "deleted" timestamp DEFAULT NULL, "citable_agent" varchar(255) DEFAULT NULL, "root_taxon_rank" integer DEFAULT NULL, "root_taxon_name" varchar(150) DEFAULT NULL, "scope_continent_code" char(2) DEFAULT NULL, "scope_country_code" char(2) DEFAULT NULL, "provider_record_count" integer DEFAULT NULL, "taxonomic_priority" integer NOT NULL DEFAULT '100', "website_url" varchar(255) DEFAULT NULL, "occurrence_clean_geospatial_count" integer DEFAULT NULL, "lock_display_name" integer NOT NULL DEFAULT '0', "lock_citable_agent" integer NOT NULL DEFAULT '0', "lock_basis_of_record" integer NOT NULL DEFAULT '0', "override_citation" integer NOT NULL DEFAULT '0', "gbif_registry_uuid" char(50) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "data_provider_id" ("data_provider_id")*/CHECK (true), /*KEY "IX_data_resource_name" ("name")*/CHECK (true), /*KEY "IX_data_resource_display_name" ("display_name")*/CHECK (true), /*KEY "IX_data_resource_shared_taxonomy" ("shared_taxonomy")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "data_resource_agent" -- DROP TABLE IF EXISTS "data_resource_agent"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "data_resource_agent" ( "id" integer NOT NULL, "data_resource_id" integer NOT NULL, "agent_id" integer NOT NULL, "agent_type" integer NOT NULL, PRIMARY KEY ("id"), /*KEY "data_resource_id" ("data_resource_id")*/CHECK (true), /*KEY "agent_id" ("agent_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "entity_type" -- DROP TABLE IF EXISTS "entity_type"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "entity_type" ( "id" integer NOT NULL, "entity_type" varchar(255) DEFAULT NULL, PRIMARY KEY ("id") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "gbif_log_message" -- DROP TABLE IF EXISTS "gbif_log_message"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "gbif_log_message" ( "id" integer NOT NULL, "portal_instance_id" integer DEFAULT NULL, "log_group_id" integer DEFAULT NULL, "event_id" integer DEFAULT '0', "level" integer DEFAULT NULL, "data_provider_id" integer DEFAULT NULL, "data_resource_id" integer DEFAULT NULL, "occurrence_id" integer DEFAULT NULL, "taxon_concept_id" integer DEFAULT NULL, "user_id" integer DEFAULT NULL, "message" text, "restricted" integer DEFAULT NULL, "count" integer DEFAULT NULL, "timestamp" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ("id"), /*KEY "log_group_id" ("log_group_id")*/CHECK (true), /*KEY "portal_instance_id" ("portal_instance_id")*/CHECK (true), /*KEY "level" ("level")*/CHECK (true), /*KEY "event_id" ("event_id")*/CHECK (true), /*KEY "timestamp" ("timestamp")*/CHECK (true), /*KEY "user_id" ("user_id")*/CHECK (true), /*KEY "portal_instance_id_2" ("portal_instance_id","log_group_id")*/CHECK (true), /*KEY "data_resource_id" ("data_resource_id","event_id","timestamp")*/CHECK (true), /*KEY "data_provider_id" ("data_provider_id","event_id","timestamp")*/CHECK (true), /*KEY "occurrence_id" ("occurrence_id","event_id","timestamp")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "gbif_user" -- DROP TABLE IF EXISTS "gbif_user"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "gbif_user" ( "id" integer NOT NULL, "portal_instance_id" integer NOT NULL, "name" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "verified" integer NOT NULL DEFAULT '0', PRIMARY KEY ("id"), /*KEY "IX_gbif_user_verified" ("verified")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "geo_mapping" -- DROP TABLE IF EXISTS "geo_mapping"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "geo_mapping" ( "geo_region_id" integer NOT NULL, "occurrence_id" integer NOT NULL, PRIMARY KEY ("geo_region_id","occurrence_id") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "geo_region" -- DROP TABLE IF EXISTS "geo_region"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "geo_region" ( "id" integer NOT NULL DEFAULT '0', "name" varchar(255) DEFAULT NULL, "region_type" integer DEFAULT NULL, "iso_country_code" char(2) DEFAULT NULL, "concept_count" integer DEFAULT '0', "species_count" integer DEFAULT '0', "occurrence_count" integer DEFAULT NULL, "occurrence_coordinate_count" integer DEFAULT '0', "min_latitude" float DEFAULT NULL, "max_latitude" float DEFAULT NULL, "min_longitude" float DEFAULT NULL, "max_longitude" float DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "ix_geo_region_iso_country_code" ("iso_country_code")*/CHECK (true), /*KEY "ix_geo_region_name" ("name")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "geographical_coverage_tag" -- DROP TABLE IF EXISTS "geographical_coverage_tag"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "geographical_coverage_tag" ( "id" integer NOT NULL, "tag_id" integer DEFAULT NULL, "entity_id" integer DEFAULT NULL, "min_longitude" float DEFAULT NULL, "min_latitude" float DEFAULT NULL, "max_longitude" float DEFAULT NULL, "max_latitude" float DEFAULT NULL, "is_system_generated" bit(1) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "tag_id" ("tag_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "gmba" -- DROP TABLE IF EXISTS "gmba"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "gmba" ( "cellnr" integer DEFAULT NULL, "latitude" float DEFAULT NULL, "longitude" float DEFAULT NULL, "elevation" integer DEFAULT NULL, "relief" integer DEFAULT NULL, "continent" integer DEFAULT NULL, "seadist" integer DEFAULT NULL, "mtdist" integer DEFAULT NULL, "vegcode" integer DEFAULT NULL, "tpcode" integer DEFAULT NULL, "cell_id" integer DEFAULT NULL, "tvzcode" integer DEFAULT NULL, "cell_id2" integer DEFAULT NULL, /*KEY "relief" ("relief")*/CHECK (true), /*KEY "cell_id" ("cell_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "identifier_record" -- DROP TABLE IF EXISTS "identifier_record"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "identifier_record" ( "id" integer NOT NULL, "data_resource_id" integer NOT NULL, "occurrence_id" integer DEFAULT NULL, "identifier_type" integer NOT NULL DEFAULT '0', "identifier" varchar(255) NOT NULL, PRIMARY KEY ("id"), /*KEY "ix_identifier_record_occurrence" ("occurrence_id")*/CHECK (true), /*KEY "id_identifier_record_resource" ("data_resource_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "image_record" -- DROP TABLE IF EXISTS "image_record"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "image_record" ( "id" integer NOT NULL, "data_resource_id" integer NOT NULL, "occurrence_id" integer DEFAULT NULL, "taxon_concept_id" integer DEFAULT NULL, "raw_image_type" varchar(128) DEFAULT NULL, "image_type" integer NOT NULL DEFAULT '0', "url" varchar(255) NOT NULL, "description" text, "rights" text, "html_for_display" text, PRIMARY KEY ("id"), /*KEY "ix_image_record_occurrence" ("occurrence_id")*/CHECK (true), /*KEY "ix_image_record_resource_taxon_concept" ("data_resource_id","taxon_concept_id")*/CHECK (true), /*KEY "ix_image_record_taxon_concept_id" ("taxon_concept_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "index_data" -- DROP TABLE IF EXISTS "index_data"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "index_data" ( "id" integer NOT NULL, "resource_access_point_id" integer NOT NULL, "type" integer DEFAULT NULL, "lower_value" varchar(255) DEFAULT NULL, "upper_value" varchar(255) DEFAULT NULL, "started" timestamp DEFAULT NULL, "finished" timestamp DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "IX_indexing_data_1" ("resource_access_point_id")*/CHECK (true), /*KEY "IX_indexing_data_2" ("started")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "institution_code" -- DROP TABLE IF EXISTS "institution_code"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "institution_code" ( "id" integer NOT NULL, "code" varchar(255) NOT NULL, PRIMARY KEY ("id"), /*KEY "ix_ic_institution_code" ("code")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "ip_country" -- DROP TABLE IF EXISTS "ip_country"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "ip_country" ( "id" integer NOT NULL, "start" char(15) NOT NULL, "end" char(15) NOT NULL, "start_long" bigint DEFAULT NULL, "end_long" bigint DEFAULT NULL, "iso_country_code" char(12) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "IX_ip_country_range" ("start_long","end_long")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "link_record" -- DROP TABLE IF EXISTS "link_record"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "link_record" ( "id" integer NOT NULL, "data_resource_id" integer NOT NULL, "occurrence_id" integer DEFAULT NULL, "taxon_concept_id" integer DEFAULT NULL, "raw_link_type" varchar(128) DEFAULT NULL, "link_type" integer NOT NULL DEFAULT '0', "url" varchar(255) NOT NULL, "description" text, PRIMARY KEY ("id"), /*KEY "ix_link_record_occurrence" ("occurrence_id")*/CHECK (true), /*KEY "ix_link_record_taxon_concept" ("taxon_concept_id")*/CHECK (true), /*KEY "id_link_record_resource" ("data_resource_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "lookup_agent_type" -- DROP TABLE IF EXISTS "lookup_agent_type"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "lookup_agent_type" ( "la_key" integer DEFAULT NULL, "la_value" varchar(100) DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "lookup_basis_of_record" -- DROP TABLE IF EXISTS "lookup_basis_of_record"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "lookup_basis_of_record" ( "br_key" integer DEFAULT NULL, "br_value" varchar(100) DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "lookup_cell_density_type" -- DROP TABLE IF EXISTS "lookup_cell_density_type"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "lookup_cell_density_type" ( "cd_key" integer DEFAULT NULL, "cd_value" varchar(100) DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "lookup_identifier_type" -- DROP TABLE IF EXISTS "lookup_identifier_type"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "lookup_identifier_type" ( "it_key" integer DEFAULT NULL, "it_value" varchar(100) DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "lookup_image_type" -- DROP TABLE IF EXISTS "lookup_image_type"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "lookup_image_type" ( "im_key" integer DEFAULT NULL, "im_value" varchar(100) DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "lookup_link_type" -- DROP TABLE IF EXISTS "lookup_link_type"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "lookup_link_type" ( "li_key" integer DEFAULT NULL, "li_value" varchar(100) DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "lookup_log_event_type" -- DROP TABLE IF EXISTS "lookup_log_event_type"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "lookup_log_event_type" ( "le_key" integer DEFAULT NULL, "le_value" varchar(100) DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "lookup_quad_relation_entity" -- DROP TABLE IF EXISTS "lookup_quad_relation_entity"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "lookup_quad_relation_entity" ( "qe_attribute" varchar(25) DEFAULT NULL, "qe_resolution" varchar(100) DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "lookup_relationship_assertion_type" -- DROP TABLE IF EXISTS "lookup_relationship_assertion_type"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "lookup_relationship_assertion_type" ( "ra_key" integer DEFAULT NULL, "ra_value" varchar(100) DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "lookup_remote_concept_remote_id" -- DROP TABLE IF EXISTS "lookup_remote_concept_remote_id"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "lookup_remote_concept_remote_id" ( "rc_key" integer DEFAULT NULL, "rc_value" varchar(100) DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "namespace_mapping" -- DROP TABLE IF EXISTS "namespace_mapping"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "namespace_mapping" ( "resource_access_point_id" integer NOT NULL, "property_store_namespace_id" integer NOT NULL, "priority" integer NOT NULL, PRIMARY KEY ("property_store_namespace_id","resource_access_point_id"), /*KEY "property_store_namespace_id" ("property_store_namespace_id")*/CHECK (true), /*KEY "resource_access_point_id" ("resource_access_point_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "network_membership" -- DROP TABLE IF EXISTS "network_membership"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "network_membership" ( "id" integer NOT NULL, "data_resource_id" integer NOT NULL, "resource_network_id" integer NOT NULL, PRIMARY KEY ("id"), /*KEY "data_resource_id" ("data_resource_id")*/CHECK (true), /*KEY "resource_network_id" ("resource_network_id")*/CHECK (true), /*KEY "IX_network_membership_id" ("id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "number_tag" -- DROP TABLE IF EXISTS "number_tag"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "number_tag" ( "id" integer NOT NULL, "tag_id" integer DEFAULT NULL, "entity_id" integer DEFAULT NULL, "value" float DEFAULT NULL, "is_system_generated" bit(1) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "tag_id" ("tag_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "occurrence_record" -- DROP TABLE IF EXISTS "occurrence_record"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "occurrence_record" ( "id" integer NOT NULL, "data_provider_id" integer NOT NULL, "data_resource_id" integer NOT NULL, "institution_code_id" integer DEFAULT NULL, "collection_code_id" integer NOT NULL, "catalogue_number_id" integer NOT NULL, "taxon_concept_id" integer NOT NULL, "taxon_name_id" integer NOT NULL, "kingdom_concept_id" integer DEFAULT NULL, "phylum_concept_id" integer DEFAULT NULL, "class_concept_id" integer DEFAULT NULL, "order_concept_id" integer DEFAULT NULL, "family_concept_id" integer DEFAULT NULL, "genus_concept_id" integer DEFAULT NULL, "species_concept_id" integer DEFAULT NULL, "nub_concept_id" integer DEFAULT NULL, "iso_country_code" char(2) DEFAULT NULL, "latitude" float DEFAULT NULL, "longitude" float DEFAULT NULL, "cell_id" integer DEFAULT NULL, "centi_cell_id" integer DEFAULT NULL, "mod360_cell_id" integer DEFAULT NULL, "year" integer DEFAULT NULL, "month" integer DEFAULT NULL, "occurrence_date" date DEFAULT NULL, "basis_of_record" integer NOT NULL DEFAULT '0', "taxonomic_issue" integer NOT NULL DEFAULT '0', "geospatial_issue" integer DEFAULT NULL, "other_issue" integer NOT NULL DEFAULT '0', "deleted" timestamp NULL DEFAULT NULL, "altitude_metres" integer DEFAULT NULL, "depth_centimetres" integer DEFAULT NULL, "modified" timestamp NULL DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "ix_or_data_provider_id" ("data_provider_id")*/CHECK (true), /*KEY "ix_or_data_resource_id" ("data_resource_id")*/CHECK (true), /*KEY "ix_or_institution_code" ("institution_code_id")*/CHECK (true), /*KEY "ix_or_collection_code" ("collection_code_id")*/CHECK (true), /*KEY "ix_or_catalogue_number" ("catalogue_number_id")*/CHECK (true), /*KEY "ix_or_taxon_concept_id" ("taxon_concept_id")*/CHECK (true), /*KEY "ix_or_taxon_name_id" ("taxon_name_id")*/CHECK (true), /*KEY "ix_or_iso_country_code" ("iso_country_code")*/CHECK (true), /*KEY "ix_or_occurrence_date" ("occurrence_date")*/CHECK (true), /*KEY "ix_or_month" ("month")*/CHECK (true), /*KEY "ix_or_year" ("year")*/CHECK (true), /*KEY "ix_or_k_cell_mod_cell" ("kingdom_concept_id","cell_id","mod360_cell_id")*/CHECK (true), /*KEY "ix_or_p_cell_mod_cell" ("phylum_concept_id","cell_id","mod360_cell_id")*/CHECK (true), /*KEY "ix_or_c_cell_mod_cell" ("class_concept_id","cell_id","mod360_cell_id")*/CHECK (true), /*KEY "ix_or_o_cell_mod_cell" ("order_concept_id","cell_id","mod360_cell_id")*/CHECK (true), /*KEY "ix_or_f_cell_mod_cell" ("family_concept_id","cell_id","mod360_cell_id")*/CHECK (true), /*KEY "ix_or_g_cell_mod_cell" ("genus_concept_id","cell_id","mod360_cell_id")*/CHECK (true), /*KEY "ix_or_s_cell_mod_cell" ("species_concept_id","cell_id","mod360_cell_id")*/CHECK (true), /*KEY "ix_or_cell_mod_cell_nub" ("cell_id","mod360_cell_id","nub_concept_id")*/CHECK (true), /*KEY "ix_or_nub_country" ("nub_concept_id","iso_country_code")*/CHECK (true), /*KEY "ix_or_altitude_metres" ("altitude_metres")*/CHECK (true), /*KEY "ix_or_depth_centimetres" ("depth_centimetres")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "property_store_namespace" -- DROP TABLE IF EXISTS "property_store_namespace"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "property_store_namespace" ( "id" integer NOT NULL, "namespace" varchar(255) DEFAULT NULL, PRIMARY KEY ("id") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "quad_relation_tag" -- DROP TABLE IF EXISTS "quad_relation_tag"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "quad_relation_tag" ( "id" integer NOT NULL, "tag_id" integer DEFAULT NULL, "entity1_id" integer DEFAULT NULL, "entity2_id" integer DEFAULT NULL, "entity3_id" integer DEFAULT NULL, "entity4_id" integer DEFAULT NULL, "count" integer DEFAULT NULL, "rollover_id" integer DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "entity1_id" ("entity1_id","entity2_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "rank" -- DROP TABLE IF EXISTS "rank"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "rank" ( "id" integer NOT NULL, "name" char(50) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "IX_rank_1" ("name")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "raw_occurrence_record" -- DROP TABLE IF EXISTS "raw_occurrence_record"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "raw_occurrence_record" ( "id" integer NOT NULL, "data_provider_id" integer DEFAULT NULL, "data_resource_id" integer DEFAULT NULL, "resource_access_point_id" integer DEFAULT NULL, "institution_code" varchar(255) DEFAULT NULL, "collection_code" varchar(255) DEFAULT NULL, "catalogue_number" varchar(255) DEFAULT NULL, "scientific_name" varchar(255) DEFAULT NULL, "author" varchar(255) DEFAULT NULL, "rank" varchar(50) DEFAULT NULL, "kingdom" varchar(150) DEFAULT NULL, "phylum" varchar(150) DEFAULT NULL, "class" varchar(250) DEFAULT NULL, "order_rank" varchar(50) DEFAULT NULL, "family" varchar(250) DEFAULT NULL, "genus" varchar(150) DEFAULT NULL, "species" varchar(150) DEFAULT NULL, "subspecies" varchar(150) DEFAULT NULL, "latitude" varchar(50) DEFAULT NULL, "longitude" varchar(50) DEFAULT NULL, "lat_long_precision" varchar(50) DEFAULT NULL, "max_altitude" varchar(50) DEFAULT NULL, "min_altitude" varchar(50) DEFAULT NULL, "altitude_precision" varchar(50) DEFAULT NULL, "min_depth" varchar(50) DEFAULT NULL, "max_depth" varchar(50) DEFAULT NULL, "depth_precision" varchar(50) DEFAULT NULL, "continent_ocean" varchar(100) DEFAULT NULL, "country" varchar(100) DEFAULT NULL, "state_province" varchar(100) DEFAULT NULL, "county" varchar(100) DEFAULT NULL, "collector_name" varchar(255) DEFAULT NULL, "locality" text, "year" varchar(50) DEFAULT NULL, "month" varchar(50) DEFAULT NULL, "day" varchar(50) DEFAULT NULL, "basis_of_record" varchar(100) DEFAULT NULL, "identifier_name" varchar(255) DEFAULT NULL, "identification_date" timestamp DEFAULT NULL, "unit_qualifier" varchar(255) DEFAULT NULL, "created" timestamp NULL DEFAULT NULL, "modified" timestamp NULL DEFAULT NULL, "deleted" timestamp NULL DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "primarykey" ("id")*/CHECK (true), /*KEY "created" ("created","modified")*/CHECK (true), /*KEY "resource_access_point_id" ("resource_access_point_id","id")*/CHECK (true), /*KEY "data_resource_id" ("data_resource_id","catalogue_number"(50),"collection_code"(10),"institution_code"(10))*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "registration_login" -- DROP TABLE IF EXISTS "registration_login"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "registration_login" ( "id" integer NOT NULL, "login_id" varchar(255) DEFAULT NULL, "business_key" varchar(255) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "IX_registration_login_login_id" ("login_id")*/CHECK (true), /*KEY "IX_registration_login_business_key" ("business_key")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "relationship_assertion" -- DROP TABLE IF EXISTS "relationship_assertion"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "relationship_assertion" ( "from_concept_id" integer NOT NULL, "to_concept_id" integer NOT NULL, "relationship_type" integer NOT NULL, PRIMARY KEY ("from_concept_id","to_concept_id","relationship_type"), /*KEY "from_concept_id" ("from_concept_id")*/CHECK (true), /*KEY "IX_relationship_assertion_1" ("relationship_type")*/CHECK (true), /*KEY "IX_TO_CONCEPT_ID" ("to_concept_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "remote_concept" -- DROP TABLE IF EXISTS "remote_concept"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "remote_concept" ( "id" integer NOT NULL, "taxon_concept_id" integer NOT NULL, "remote_id" varchar(255) DEFAULT NULL, "id_type" integer NOT NULL, "modified" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ("id"), /*KEY "ix_remote_concept_remote_id" ("remote_id")*/CHECK (true), /*KEY "ix_remote_concept_tc_id" ("taxon_concept_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "resource_access_point" -- DROP TABLE IF EXISTS "resource_access_point"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "resource_access_point" ( "id" integer NOT NULL, "data_provider_id" integer DEFAULT NULL, "data_resource_id" integer DEFAULT NULL, "url" varchar(255) DEFAULT NULL, "remote_id_at_url" varchar(255) DEFAULT NULL, "uuid" char(50) DEFAULT NULL, "created" timestamp DEFAULT NULL, "modified" timestamp DEFAULT NULL, "deleted" timestamp DEFAULT NULL, "last_harvest_start" timestamp DEFAULT NULL, "last_extract_start" timestamp DEFAULT NULL, "supports_date_last_modified" integer NOT NULL DEFAULT '0', "interval_metadata_days" integer DEFAULT NULL, "interval_harvest_days" integer DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "data_provider_id" ("data_provider_id")*/CHECK (true), /*KEY "ix_rap_dr" ("data_resource_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "resource_country" -- DROP TABLE IF EXISTS "resource_country"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "resource_country" ( "data_resource_id" integer NOT NULL, "iso_country_code" char(2) NOT NULL, "count" integer DEFAULT NULL, "occurrence_coordinate_count" integer DEFAULT '0', PRIMARY KEY ("data_resource_id","iso_country_code"), /*KEY "IX_data_resource_ids" ("data_resource_id")*/CHECK (true), /*KEY "IX_iso_country_codes" ("iso_country_code")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "resource_network" -- DROP TABLE IF EXISTS "resource_network"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "resource_network" ( "id" integer NOT NULL, "name" varchar(255) DEFAULT NULL, "code" varchar(50) DEFAULT NULL, "description" text, "address" varchar(255) DEFAULT NULL, "website_url" varchar(255) DEFAULT NULL, "logo_url" varchar(255) DEFAULT NULL, "email" varchar(255) DEFAULT NULL, "telephone" varchar(255) DEFAULT NULL, "concept_count" integer DEFAULT '0', "species_count" integer DEFAULT '0', "occurrence_count" integer DEFAULT '0', "occurrence_coordinate_count" integer DEFAULT '0', "created" timestamp DEFAULT NULL, "modified" timestamp DEFAULT NULL, "deleted" timestamp DEFAULT NULL, "data_resource_count" integer DEFAULT '0', PRIMARY KEY ("id"), /*KEY "IX_resource_network_name" ("name")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "resource_rank" -- DROP TABLE IF EXISTS "resource_rank"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "resource_rank" ( "id" integer NOT NULL, "resource_type" integer DEFAULT NULL, "entity_id" integer DEFAULT NULL, "entity_type" integer DEFAULT NULL, "rank" integer DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "IX_resource_rank_type" ("resource_type")*/CHECK (true), /*KEY "IX_resource_rank_entity_id" ("entity_id")*/CHECK (true), /*KEY "IX_resource_rank_entity_type" ("entity_type")*/CHECK (true), /*KEY "IX_resource_rank_rank" ("rank")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "rollover" -- DROP TABLE IF EXISTS "rollover"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "rollover" ( "id" integer NOT NULL, "rollover_date" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ("id") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "stats_country_contribution" -- DROP TABLE IF EXISTS "stats_country_contribution"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "stats_country_contribution" ( "id" integer NOT NULL, "rollover_id" integer NOT NULL, "iso_country_code" char(2) DEFAULT NULL, "provider_count" integer DEFAULT '0', "dataset_count" integer DEFAULT '0', "occurrence_count" integer DEFAULT '0', "occurrence_georeferenced_count" integer DEFAULT '0', "created" timestamp DEFAULT NULL, PRIMARY KEY ("id") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "stats_participant_contribution" -- DROP TABLE IF EXISTS "stats_participant_contribution"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "stats_participant_contribution" ( "id" integer NOT NULL, "rollover_id" integer NOT NULL, "gbif_approver" varchar(255) DEFAULT NULL, "provider_count" integer DEFAULT '0', "dataset_count" integer DEFAULT '0', "occurrence_count" integer DEFAULT '0', "occurrence_georeferenced_count" integer DEFAULT '0', "created" timestamp DEFAULT NULL, PRIMARY KEY ("id") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "stats_participant_data_usage" -- DROP TABLE IF EXISTS "stats_participant_data_usage"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "stats_participant_data_usage" ( "gbif_approver" varchar(150) DEFAULT NULL, "month" varchar(50) DEFAULT NULL, "year" varchar(50) DEFAULT NULL, "search_event_count" integer DEFAULT '0', "search_record_count" integer DEFAULT '0', "occurrence_detail_page_view" integer DEFAULT '0', "download_event_count" integer DEFAULT '0', "download_record_count" integer DEFAULT '0' ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "string_tag" -- DROP TABLE IF EXISTS "string_tag"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "string_tag" ( "id" integer NOT NULL, "tag_id" integer DEFAULT NULL, "entity_id" integer DEFAULT NULL, "value" text, "is_system_generated" bit(1) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "tag_id" ("tag_id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "tag" -- DROP TABLE IF EXISTS "tag"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "tag" ( "id" integer NOT NULL, "name" char(200) DEFAULT NULL, "entity_type" integer DEFAULT NULL, "tag_table" char(30) DEFAULT NULL, "description" varchar(255) DEFAULT NULL, PRIMARY KEY ("id") ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "taxon_concept" -- DROP TABLE IF EXISTS "taxon_concept"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "taxon_concept" ( "id" integer NOT NULL DEFAULT '0', "rank" integer NOT NULL, "taxon_name_id" integer NOT NULL, "data_provider_id" integer NOT NULL, "data_resource_id" integer NOT NULL, "parent_concept_id" integer DEFAULT NULL, "kingdom_concept_id" integer DEFAULT NULL, "phylum_concept_id" integer DEFAULT NULL, "class_concept_id" integer DEFAULT NULL, "order_concept_id" integer DEFAULT NULL, "family_concept_id" integer DEFAULT NULL, "genus_concept_id" integer DEFAULT NULL, "species_concept_id" integer DEFAULT NULL, "is_accepted" integer DEFAULT '1', "is_nub_concept" integer DEFAULT '0', "partner_concept_id" integer DEFAULT NULL, "priority" integer NOT NULL DEFAULT '100', "is_secondary" integer DEFAULT '0', "created" timestamp NULL DEFAULT NULL, "modified" timestamp NULL DEFAULT NULL, "deleted" timestamp NULL DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "ix_taxon_concept_dr_rank" ("data_resource_id","rank")*/CHECK (true), /*KEY "ix_taxon_concept_partner_dr" ("partner_concept_id","data_resource_id")*/CHECK (true), /*KEY "ix_taxon_concept_tn_dr" ("taxon_name_id","data_resource_id")*/CHECK (true), /*KEY "ix_taxon_concept_parent" ("parent_concept_id")*/CHECK (true), /*KEY "ix_taxon_concept_k" ("kingdom_concept_id")*/CHECK (true), /*KEY "ix_taxon_concept_p" ("phylum_concept_id")*/CHECK (true), /*KEY "ix_taxon_concept_c" ("class_concept_id")*/CHECK (true), /*KEY "ix_taxon_concept_o" ("order_concept_id")*/CHECK (true), /*KEY "ix_taxon_concept_f" ("family_concept_id")*/CHECK (true), /*KEY "ix_taxon_concept_g" ("genus_concept_id")*/CHECK (true), /*KEY "ix_taxon_concept_s" ("species_concept_id")*/CHECK (true), /*KEY "ix_taxon_concept_dp" ("data_provider_id")*/CHECK (true), /*KEY "ix_taxon_concept_dp_rank" ("data_provider_id","rank")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "taxon_country" -- DROP TABLE IF EXISTS "taxon_country"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "taxon_country" ( "taxon_concept_id" integer NOT NULL, "iso_country_code" char(2) NOT NULL, "count" integer DEFAULT NULL, PRIMARY KEY ("taxon_concept_id","iso_country_code"), /*KEY "IX_taxon_concept_ids" ("taxon_concept_id")*/CHECK (true), /*KEY "IX_iso_country_codes" ("iso_country_code")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "taxon_name" -- DROP TABLE IF EXISTS "taxon_name"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "taxon_name" ( "id" integer NOT NULL, "canonical" text, "supra_generic" varchar(255) DEFAULT NULL, "generic" varchar(255) DEFAULT NULL, "infrageneric" varchar(255) DEFAULT NULL, "specific_epithet" varchar(255) DEFAULT NULL, "infraspecific" varchar(255) DEFAULT NULL, "infraspecific_marker" varchar(255) DEFAULT NULL, "is_hybrid" integer DEFAULT NULL, "rank" integer NOT NULL, "author" varchar(255) DEFAULT NULL, "searchable_canonical" text, PRIMARY KEY ("id"), /*KEY "IX_taxon_name_specific_epithet" ("specific_epithet")*/CHECK (true), /*KEY "ix_taxon_name_canonical_rank" ("canonical"(50),"rank")*/CHECK (true), /*KEY "ix_taxon_name_searchable_canonical_rank" ("searchable_canonical"(50),"rank")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "temporal_coverage_tag" -- DROP TABLE IF EXISTS "temporal_coverage_tag"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "temporal_coverage_tag" ( "id" integer NOT NULL, "tag_id" integer DEFAULT NULL, "entity_id" integer DEFAULT NULL, "start_date" date NOT NULL, "end_date" date DEFAULT NULL, "is_system_generated" bit(1) DEFAULT NULL, PRIMARY KEY ("id"), /*KEY "id" ("id")*/CHECK (true) ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "tmp_IMSregions" -- DROP TABLE IF EXISTS "tmp_IMSregions"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "tmp_IMSregions" ( "gbif_membership" varchar(100) DEFAULT NULL, "name_lct" varchar(255) DEFAULT NULL, "name_short" varchar(100) DEFAULT NULL, "iso2" varchar(2) DEFAULT NULL, "gbif_area" varchar(100) DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table "typification_record" -- DROP TABLE IF EXISTS "typification_record"; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "typification_record" ( "id" integer NOT NULL, "data_resource_id" integer NOT NULL, "occurrence_id" integer DEFAULT NULL, "taxon_name_id" integer DEFAULT NULL, "scientific_name" varchar(255) DEFAULT NULL, "publication" text, "type_status" varchar(255) NOT NULL, "notes" text, PRIMARY KEY ("id"), /*KEY "ix_typification_record_occurrence" ("occurrence_id")*/CHECK (true), /*KEY "ix_typification_record_name" ("taxon_name_id")*/CHECK (true), /*KEY "ix_typification_record_resource" ("data_resource_id")*/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 2013-03-28 18:36:26