Project

General

Profile

« Previous | Next » 

Revision 5312

schemas/vegbien.sql: taxonconcept: Added creationdate (the date the taxonconcept was created or defined), and include it in the taxonconcept_unique unique index

View differences:

schemas/vegbien.my.sql
781 781
CREATE TABLE taxonconcept (
782 782
    taxonconcept_id int(11) NOT NULL,
783 783
    creator_id int(11) NOT NULL,
784
    creationdate timestamp NULL,
784 785
    canon_taxonconcept_id int(11),
785 786
    parent_id int(11),
786 787
    taxonname text,
......
813 814

  
814 815

  
815 816
--
817
-- Name: COLUMN taxonconcept.creationdate; Type: COMMENT; Schema: public; Owner: -
818
--
819

  
820

  
821

  
822

  
823
--
816 824
-- Name: COLUMN taxonconcept.canon_taxonconcept_id; Type: COMMENT; Schema: public; Owner: -
817 825
--
818 826

  
schemas/vegbien.sql
1115 1115
CREATE TABLE taxonconcept (
1116 1116
    taxonconcept_id integer NOT NULL,
1117 1117
    creator_id integer NOT NULL,
1118
    creationdate timestamp with time zone,
1118 1119
    canon_taxonconcept_id integer,
1119 1120
    parent_id integer,
1120 1121
    taxonname text,
......
1156 1157

  
1157 1158

  
1158 1159
--
1160
-- Name: COLUMN taxonconcept.creationdate; Type: COMMENT; Schema: public; Owner: -
1161
--
1162

  
1163
COMMENT ON COLUMN taxonconcept.creationdate IS 'The date the taxonconcept was created or defined. For a taxonconcept applied in a taxondetermination, this is the date the determination was made.';
1164

  
1165

  
1166
--
1159 1167
-- Name: COLUMN taxonconcept.canon_taxonconcept_id; Type: COMMENT; Schema: public; Owner: -
1160 1168
--
1161 1169

  
......
4557 4565
-- Name: taxonconcept_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4558 4566
--
4559 4567

  
4560
CREATE UNIQUE INDEX taxonconcept_unique ON taxonconcept USING btree ((COALESCE(parent_id, 2147483647)), (COALESCE(taxonname, '\\N'::text)), (COALESCE(rank, 'unknown'::taxonrank)), creator_id, (COALESCE(identifyingtaxonomicname, '\\N'::text)), (COALESCE(taxonomicname, '\\N'::text)), (COALESCE(author, '\\N'::text)), (COALESCE(taxonomicnamewithauthor, '\\N'::text)), (COALESCE(family, '\\N'::text)), (COALESCE(genus, '\\N'::text)), (COALESCE(species, '\\N'::text)));
4568
CREATE UNIQUE INDEX taxonconcept_unique ON taxonconcept USING btree ((COALESCE(parent_id, 2147483647)), (COALESCE(taxonname, '\\N'::text)), (COALESCE(rank, 'unknown'::taxonrank)), creator_id, (COALESCE(creationdate, 'infinity'::timestamp with time zone)), (COALESCE(identifyingtaxonomicname, '\\N'::text)), (COALESCE(taxonomicname, '\\N'::text)), (COALESCE(author, '\\N'::text)), (COALESCE(taxonomicnamewithauthor, '\\N'::text)), (COALESCE(family, '\\N'::text)), (COALESCE(genus, '\\N'::text)), (COALESCE(species, '\\N'::text)));
4561 4569

  
4562 4570

  
4563 4571
--

Also available in: Unified diff