Revision 3711
Added by Aaron Marcuse-Kubitza over 12 years ago
schemas/vegbien.my.sql | ||
---|---|---|
3890 | 3890 |
|
3891 | 3891 |
|
3892 | 3892 |
-- |
3893 |
-- Name: taxonoccurrence_unique_within_locationevent; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
3894 |
-- |
|
3895 |
|
|
3896 |
|
|
3897 |
|
|
3898 |
|
|
3899 |
-- |
|
3893 | 3900 |
-- Name: userdefined_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
3894 | 3901 |
-- |
3895 | 3902 |
|
schemas/vegbien.sql | ||
---|---|---|
4426 | 4426 |
|
4427 | 4427 |
|
4428 | 4428 |
-- |
4429 |
-- Name: taxonoccurrence_unique_within_locationevent; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4430 |
-- |
|
4431 |
|
|
4432 |
CREATE UNIQUE INDEX taxonoccurrence_unique_within_locationevent ON taxonoccurrence USING btree (locationevent_id, (COALESCE(sourceaccessioncode, '\\N'::text))); |
|
4433 |
|
|
4434 |
|
|
4435 |
-- |
|
4429 | 4436 |
-- Name: userdefined_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4430 | 4437 |
-- |
4431 | 4438 |
|
Also available in: Unified diff
schemas/vegbien.sql: taxonoccurrence: Added UNIQUE INDEX that makes a taxonoccurrence unique within a locationevent. When the sourceaccessioncode isn't specified (as for specimens data), this ensures a 1:1 relationship between taxonoccurrence and locationevent.