Revision 3712
Added by Aaron Marcuse-Kubitza over 12 years ago
schemas/vegbien.my.sql | ||
---|---|---|
3603 | 3603 |
|
3604 | 3604 |
|
3605 | 3605 |
-- |
3606 |
-- Name: aggregateoccurrence_unique_within_taxonoccurrence; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
3607 |
-- |
|
3608 |
|
|
3609 |
|
|
3610 |
|
|
3611 |
|
|
3612 |
-- |
|
3606 | 3613 |
-- Name: commclass_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
3607 | 3614 |
-- |
3608 | 3615 |
|
schemas/vegbien.sql | ||
---|---|---|
4139 | 4139 |
|
4140 | 4140 |
|
4141 | 4141 |
-- |
4142 |
-- Name: aggregateoccurrence_unique_within_taxonoccurrence; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4143 |
-- |
|
4144 |
|
|
4145 |
CREATE UNIQUE INDEX aggregateoccurrence_unique_within_taxonoccurrence ON aggregateoccurrence USING btree (taxonoccurrence_id, (COALESCE(sourceaccessioncode, '\\N'::text))); |
|
4146 |
|
|
4147 |
|
|
4148 |
-- |
|
4142 | 4149 |
-- Name: commclass_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4143 | 4150 |
-- |
4144 | 4151 |
|
Also available in: Unified diff
schemas/vegbien.sql: aggregateoccurrence: Added UNIQUE INDEX that makes an aggregateoccurrence unique within a taxonoccurrence. When the sourceaccessioncode isn't specified (as for individual organisms data, where this goes in plantobservation and taxonoccurrence), this ensures a 1:1 relationship between aggregateoccurrence and taxonoccurrence.