Revision 4829
Added by Aaron Marcuse-Kubitza about 12 years ago
vegbien.sql | ||
---|---|---|
4644 | 4644 |
-- Name: stemobservation_unique_within_plantobservation; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4645 | 4645 |
-- |
4646 | 4646 |
|
4647 |
CREATE UNIQUE INDEX stemobservation_unique_within_plantobservation ON stemobservation USING btree (plantobservation_id, (COALESCE(authorstemcode, '\\N'::text))) WHERE (authorstemcode IS NOT NULL);
|
|
4647 |
CREATE UNIQUE INDEX stemobservation_unique_within_plantobservation ON stemobservation USING btree (plantobservation_id, (COALESCE(authorstemcode, '\\N'::text))) WHERE (sourceaccessioncode IS NULL);
|
|
4648 | 4648 |
|
4649 | 4649 |
|
4650 | 4650 |
-- |
Also available in: Unified diff
schemas/vegbien.sql: stemobservation: stemobservation_unique_within_plantobservation unique index: Fixed bug where filter condition underconstrained stemobservation when neither sourceaccessioncode nor authorstemcode was specified, by making sure that at least one *_unique index always applies