1087 |
1087 |
CREATE TABLE taxonconcept (
|
1088 |
1088 |
taxonconcept_id integer NOT NULL,
|
1089 |
1089 |
datasource_id integer NOT NULL,
|
|
1090 |
concept_reference_id integer,
|
1090 |
1091 |
identifyingtaxonomicname text,
|
1091 |
1092 |
canon_taxonconcept_id integer,
|
1092 |
1093 |
taxon_id integer,
|
... | ... | |
1107 |
1108 |
cultivar text,
|
1108 |
1109 |
morphospecies text,
|
1109 |
1110 |
otherranks rankedtaxonname[],
|
1110 |
|
concept_reference_id integer,
|
1111 |
1111 |
accessioncode text,
|
1112 |
1112 |
CONSTRAINT taxonconcept_required_key CHECK (((((((identifyingtaxonomicname IS NOT NULL) OR (taxonomicname IS NOT NULL)) OR (taxonomicnamewithauthor IS NOT NULL)) OR (family IS NOT NULL)) OR (genus IS NOT NULL)) OR (otherranks IS NOT NULL)))
|
1113 |
1113 |
);
|
... | ... | |
1125 |
1125 |
|
1126 |
1126 |
|
1127 |
1127 |
--
|
|
1128 |
-- Name: COLUMN taxonconcept.concept_reference_id; Type: COMMENT; Schema: public; Owner: -
|
|
1129 |
--
|
|
1130 |
|
|
1131 |
COMMENT ON COLUMN taxonconcept.concept_reference_id IS 'The entity that defined the taxon concept.';
|
|
1132 |
|
|
1133 |
|
|
1134 |
--
|
1128 |
1135 |
-- Name: COLUMN taxonconcept.identifyingtaxonomicname; Type: COMMENT; Schema: public; Owner: -
|
1129 |
1136 |
--
|
1130 |
1137 |
|
... | ... | |
1274 |
1281 |
|
1275 |
1282 |
|
1276 |
1283 |
--
|
1277 |
|
-- Name: COLUMN taxonconcept.concept_reference_id; Type: COMMENT; Schema: public; Owner: -
|
1278 |
|
--
|
1279 |
|
|
1280 |
|
COMMENT ON COLUMN taxonconcept.concept_reference_id IS 'The entity that defined the taxon concept.';
|
1281 |
|
|
1282 |
|
|
1283 |
|
--
|
1284 |
1284 |
-- Name: taxondetermination; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
1285 |
1285 |
--
|
1286 |
1286 |
|
... | ... | |
4704 |
4704 |
-- Name: taxonconcept_unique_within_datasource_by_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
4705 |
4705 |
--
|
4706 |
4706 |
|
4707 |
|
CREATE UNIQUE INDEX taxonconcept_unique_within_datasource_by_name ON taxonconcept USING btree (datasource_id, (COALESCE(taxonomicname, '\\N'::text)), (COALESCE(author, '\\N'::text)), (COALESCE(taxonomicnamewithauthor, '\\N'::text)), (COALESCE(domain, '\\N'::text)), (COALESCE(kingdom, '\\N'::text)), (COALESCE(phylum, '\\N'::text)), (COALESCE(class, '\\N'::text)), (COALESCE("order", '\\N'::text)), (COALESCE(family, '\\N'::text)), (COALESCE(genus, '\\N'::text)), (COALESCE(species, '\\N'::text)), (COALESCE(subspecies, '\\N'::text)), (COALESCE(variety, '\\N'::text)), (COALESCE(forma, '\\N'::text)), (COALESCE(cultivar, '\\N'::text)), (COALESCE(morphospecies, '\\N'::text)), (COALESCE(otherranks, ARRAY[]::rankedtaxonname[])), (COALESCE(concept_reference_id, 2147483647))) WHERE (identifyingtaxonomicname IS NULL);
|
|
4707 |
CREATE UNIQUE INDEX taxonconcept_unique_within_datasource_by_name ON taxonconcept USING btree (datasource_id, (COALESCE(concept_reference_id, 2147483647)), (COALESCE(taxonomicname, '\\N'::text)), (COALESCE(author, '\\N'::text)), (COALESCE(taxonomicnamewithauthor, '\\N'::text)), (COALESCE(domain, '\\N'::text)), (COALESCE(kingdom, '\\N'::text)), (COALESCE(phylum, '\\N'::text)), (COALESCE(class, '\\N'::text)), (COALESCE("order", '\\N'::text)), (COALESCE(family, '\\N'::text)), (COALESCE(genus, '\\N'::text)), (COALESCE(species, '\\N'::text)), (COALESCE(subspecies, '\\N'::text)), (COALESCE(variety, '\\N'::text)), (COALESCE(forma, '\\N'::text)), (COALESCE(cultivar, '\\N'::text)), (COALESCE(morphospecies, '\\N'::text)), (COALESCE(otherranks, ARRAY[]::rankedtaxonname[]))) WHERE (identifyingtaxonomicname IS NULL);
|
4708 |
4708 |
|
4709 |
4709 |
|
4710 |
4710 |
--
|
schemas/vegbien.sql: taxonconcept: Moved concept_reference_id to the top of the table because it is now a key scoping field