Project

General

Profile

« Previous | Next » 

Revision 4699

schemas/vegbien.sql: plantconcept: Added datasource_id and appropriate unique indexes to enable scoping by datasource. Moved plantcode right after datasource_id because it will be used for the sourceaccessioncode (if any).

View differences:

vegbien.my.sql
668 668

  
669 669
CREATE TABLE plantconcept (
670 670
    plantconcept_id int(11) NOT NULL,
671
    datasource_id int(11) NOT NULL,
672
    plantcode text,
671 673
    plantname_id int(11) NOT NULL,
672 674
    scientificname text,
673 675
    scientificnameauthor text,
......
684 686
    variety text,
685 687
    forma text,
686 688
    cultivar text,
687
    plantcode text,
688 689
    accessioncode text
689 690
);
690 691

  
......
3273 3274

  
3274 3275

  
3275 3276
--
3276
-- Name: plantconcept_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3277
--
3278

  
3279
ALTER TABLE plantconcept
3280
    ADD CONSTRAINT plantconcept_unique UNIQUE (plantname_id);
3281

  
3282

  
3283
--
3284 3277
-- Name: plantcorrelation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3285 3278
--
3286 3279

  
......
3766 3759

  
3767 3760

  
3768 3761
--
3762
-- Name: plantconcept_unique_within_datasource_by_code; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3763
--
3764

  
3765

  
3766

  
3767

  
3768
--
3769
-- Name: plantconcept_unique_within_datasource_by_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3770
--
3771

  
3772

  
3773

  
3774

  
3775
--
3769 3776
-- Name: plantname_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3770 3777
--
3771 3778

  
......
4470 4477

  
4471 4478

  
4472 4479
--
4480
-- Name: plantconcept_datasource_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4481
--
4482

  
4483

  
4484

  
4485

  
4486
--
4473 4487
-- Name: plantconcept_plantname_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4474 4488
--
4475 4489

  

Also available in: Unified diff