Project

General

Profile

« Previous | Next » 

Revision 5615

schemas/vegbien.sql: taxonlabel: Added concept_reference_id, which is the entity that defined the taxon concept (who the taxon label is according to)

View differences:

schemas/vegbien.my.sql
198 198
    taxonlabel_id int(11) NOT NULL,
199 199
    creator_id int(11) NOT NULL,
200 200
    sourceaccessioncode text,
201
    concept_reference_id int(11),
201 202
    creationdate date,
202 203
    accepted_label_id int(11),
203 204
    matched_label_id int(11),
......
241 242

  
242 243

  
243 244
--
245
-- Name: COLUMN taxonlabel.concept_reference_id; Type: COMMENT; Schema: public; Owner: -
246
--
247

  
248

  
249

  
250

  
251
--
244 252
-- Name: COLUMN taxonlabel.creationdate; Type: COMMENT; Schema: public; Owner: -
245 253
--
246 254

  
......
4907 4915

  
4908 4916

  
4909 4917
--
4918
-- Name: taxonlabel_concept_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4919
--
4920

  
4921

  
4922

  
4923

  
4924
--
4910 4925
-- Name: taxonlabel_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4911 4926
--
4912 4927

  
schemas/vegbien.sql
497 497
    taxonlabel_id integer NOT NULL,
498 498
    creator_id integer NOT NULL,
499 499
    sourceaccessioncode text,
500
    concept_reference_id integer,
500 501
    creationdate date,
501 502
    accepted_label_id integer,
502 503
    matched_label_id integer,
......
516 517
    description text,
517 518
    accessioncode text,
518 519
    CONSTRAINT taxonlabel_matched_label_fit_fraction_range CHECK (((matched_label_fit_fraction >= (0)::double precision) AND (matched_label_fit_fraction <= (1)::double precision))),
519
    CONSTRAINT taxonlabel_required_key CHECK ((((((((sourceaccessioncode IS NOT NULL) OR (taxonepithet IS NOT NULL)) OR (identifyingtaxonomicname IS NOT NULL)) OR (taxonomicname IS NOT NULL)) OR (taxonomicnamewithauthor IS NOT NULL)) OR (morphospecies IS NOT NULL)) OR ((parent_id IS NOT NULL) AND ((creationdate IS NOT NULL) OR (author IS NOT NULL)))))
520
    CONSTRAINT taxonlabel_required_key CHECK ((((((((sourceaccessioncode IS NOT NULL) OR (taxonepithet IS NOT NULL)) OR (identifyingtaxonomicname IS NOT NULL)) OR (taxonomicname IS NOT NULL)) OR (taxonomicnamewithauthor IS NOT NULL)) OR (morphospecies IS NOT NULL)) OR ((parent_id IS NOT NULL) AND (((concept_reference_id IS NOT NULL) OR (creationdate IS NOT NULL)) OR (author IS NOT NULL)))))
520 521
);
521 522

  
522 523

  
......
552 553

  
553 554

  
554 555
--
556
-- Name: COLUMN taxonlabel.concept_reference_id; Type: COMMENT; Schema: public; Owner: -
557
--
558

  
559
COMMENT ON COLUMN taxonlabel.concept_reference_id IS 'The entity that defined the taxon concept. This is who the taxon label is according to.
560

  
561
Equivalent to "Name sec. x".';
562

  
563

  
564
--
555 565
-- Name: COLUMN taxonlabel.creationdate; Type: COMMENT; Schema: public; Owner: -
556 566
--
557 567

  
......
4722 4732
-- Name: taxonlabel_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4723 4733
--
4724 4734

  
4725
CREATE UNIQUE INDEX taxonlabel_unique ON taxonlabel USING btree ((COALESCE(parent_id, 2147483647)), (COALESCE(taxonepithet, '\\N'::text)), (COALESCE(rank, 'unknown'::taxonrank)), creator_id, (COALESCE(sourceaccessioncode, '\\N'::text)), (COALESCE(creationdate, 'infinity'::date)), (COALESCE(identifyingtaxonomicname, '\\N'::text)), (COALESCE(taxonomicname, '\\N'::text)), (COALESCE(author, '\\N'::text)), (COALESCE(taxonomicnamewithauthor, '\\N'::text)), (COALESCE(morphospecies, '\\N'::text)));
4735
CREATE UNIQUE INDEX taxonlabel_unique ON taxonlabel USING btree ((COALESCE(parent_id, 2147483647)), (COALESCE(taxonepithet, '\\N'::text)), (COALESCE(rank, 'unknown'::taxonrank)), creator_id, (COALESCE(sourceaccessioncode, '\\N'::text)), (COALESCE(concept_reference_id, 2147483647)), (COALESCE(creationdate, 'infinity'::date)), (COALESCE(identifyingtaxonomicname, '\\N'::text)), (COALESCE(taxonomicname, '\\N'::text)), (COALESCE(author, '\\N'::text)), (COALESCE(taxonomicnamewithauthor, '\\N'::text)), (COALESCE(morphospecies, '\\N'::text)));
4726 4736

  
4727 4737

  
4728 4738
--
......
5670 5680

  
5671 5681

  
5672 5682
--
5683
-- Name: taxonlabel_concept_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5684
--
5685

  
5686
ALTER TABLE ONLY taxonlabel
5687
    ADD CONSTRAINT taxonlabel_concept_reference_id_fkey FOREIGN KEY (concept_reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
5688

  
5689

  
5690
--
5673 5691
-- Name: taxonlabel_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5674 5692
--
5675 5693

  

Also available in: Unified diff