Project

General

Profile

« Previous | Next » 

Revision 3737

schemas/vegbien.sql: unique_within unique indexes used for 1:1 relationships: Renamed to __1_to_1 to better reflect what they do

View differences:

schemas/vegbien.my.sql
3564 3564

  
3565 3565

  
3566 3566
--
3567
-- Name: aggregateoccurrence_unique_within_datasource; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3567
-- Name: aggregateoccurrence_taxonoccurrence_1_to_1; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3568 3568
--
3569 3569

  
3570 3570

  
3571 3571

  
3572 3572

  
3573 3573
--
3574
-- Name: aggregateoccurrence_unique_within_taxonoccurrence; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3574
-- Name: aggregateoccurrence_unique_within_datasource; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3575 3575
--
3576 3576

  
3577 3577

  
schemas/vegbien.sql
4110 4110

  
4111 4111

  
4112 4112
--
4113
-- Name: aggregateoccurrence_unique_within_datasource; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4113
-- Name: aggregateoccurrence_taxonoccurrence_1_to_1; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4114 4114
--
4115 4115

  
4116
CREATE UNIQUE INDEX aggregateoccurrence_unique_within_datasource ON aggregateoccurrence USING btree (datasource_id, (COALESCE(sourceaccessioncode, '\\N'::text))) WHERE (sourceaccessioncode IS NOT NULL);
4116
CREATE UNIQUE INDEX aggregateoccurrence_taxonoccurrence_1_to_1 ON aggregateoccurrence USING btree (taxonoccurrence_id, (COALESCE(sourceaccessioncode, '\\N'::text)));
4117 4117

  
4118 4118

  
4119 4119
--
4120
-- Name: aggregateoccurrence_unique_within_taxonoccurrence; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4120
-- Name: aggregateoccurrence_unique_within_datasource; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4121 4121
--
4122 4122

  
4123
CREATE UNIQUE INDEX aggregateoccurrence_unique_within_taxonoccurrence ON aggregateoccurrence USING btree (taxonoccurrence_id, (COALESCE(sourceaccessioncode, '\\N'::text)));
4123
CREATE UNIQUE INDEX aggregateoccurrence_unique_within_datasource ON aggregateoccurrence USING btree (datasource_id, (COALESCE(sourceaccessioncode, '\\N'::text))) WHERE (sourceaccessioncode IS NOT NULL);
4124 4124

  
4125 4125

  
4126 4126
--

Also available in: Unified diff