Project

General

Profile

« Previous | Next » 

Revision 6907

schemas/vegbien.sql: sync_taxon_trait_to_view(): Changed pkey to index because there can be multiple values of the same taxon's trait from different observations

View differences:

vegbien.sql
1023 1023
GRANT SELECT ON TABLE taxon_trait TO bien_read;
1024 1024
GRANT SELECT ON TABLE taxon_trait_view TO bien_read;
1025 1025

  
1026
ALTER TABLE taxon_trait ADD PRIMARY KEY ("scientificName", "measurementType");
1026
ALTER TABLE taxon_trait ALTER COLUMN "scientificName" SET NOT NULL;
1027
ALTER TABLE taxon_trait ALTER COLUMN "measurementType" SET NOT NULL;
1028

  
1029
CREATE INDEX ON taxon_trait ("scientificName", "measurementType" );
1027 1030
$$;
1028 1031

  
1029 1032

  
......
5987 5990

  
5988 5991

  
5989 5992
--
5990
-- Name: taxon_trait_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
5991
--
5992

  
5993
ALTER TABLE ONLY taxon_trait
5994
    ADD CONSTRAINT taxon_trait_pkey PRIMARY KEY ("scientificName", "measurementType");
5995

  
5996

  
5997
--
5998 5993
-- Name: taxonalt_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
5999 5994
--
6000 5995

  
......
6539 6534

  
6540 6535

  
6541 6536
--
6537
-- Name: taxon_trait_scientificName_measurementType_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6538
--
6539

  
6540
CREATE INDEX "taxon_trait_scientificName_measurementType_idx" ON taxon_trait USING btree ("scientificName", "measurementType");
6541

  
6542

  
6543
--
6542 6544
-- Name: taxondetermination_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6543 6545
--
6544 6546

  

Also available in: Unified diff