Revision 1253
Added by Aaron Marcuse-Kubitza about 13 years ago
vegbien.my.sql | ||
---|---|---|
3443 | 3443 |
|
3444 | 3444 |
|
3445 | 3445 |
-- |
3446 |
-- Name: specimenreplicate_unique_catalognumber; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3447 |
-- |
|
3448 |
|
|
3449 |
ALTER TABLE specimenreplicate |
|
3450 |
ADD CONSTRAINT specimenreplicate_unique_catalognumber UNIQUE (datasource_id, collectioncode_dwc, catalognumber_dwc); |
|
3451 |
|
|
3452 |
|
|
3453 |
-- |
|
3454 |
-- Name: specimenreplicate_unique_collectionnumber; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3455 |
-- |
|
3456 |
|
|
3457 |
ALTER TABLE specimenreplicate |
|
3458 |
ADD CONSTRAINT specimenreplicate_unique_collectionnumber UNIQUE (datasource_id, verbatimcollectorname, collectionnumber); |
|
3459 |
|
|
3460 |
|
|
3461 |
-- |
|
3462 | 3446 |
-- Name: stemobservation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
3463 | 3447 |
-- |
3464 | 3448 |
|
... | ... | |
4588 | 4572 |
|
4589 | 4573 |
|
4590 | 4574 |
-- |
4575 |
-- Name: specimenreplicate_unique_catalognumber; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4576 |
-- |
|
4577 |
|
|
4578 |
|
|
4579 |
|
|
4580 |
|
|
4581 |
-- |
|
4591 | 4582 |
-- Name: stemobservation_plantobservation_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4592 | 4583 |
-- |
4593 | 4584 |
|
Also available in: Unified diff
vegbien.sql: specimenreplicate: Removed specimenreplicate_unique_collectionnumber index because the collectionnumber (NYBG FieldNumber) is not always unique within a collector, even though it should be. Changed specimenreplicate_unique_catalognumber to only operate on rows with no sourceaccessioncode (of which there are 8 in NYBG).