Revision 11152
Added by Aaron Marcuse-Kubitza about 11 years ago
schemas/vegbien.sql | ||
---|---|---|
7460 | 7460 |
-- Name: locationevent__pull_forward_from_parent; Type: TRIGGER; Schema: public; Owner: - |
7461 | 7461 |
-- |
7462 | 7462 |
|
7463 |
CREATE TRIGGER locationevent__pull_forward_from_parent BEFORE INSERT OR UPDATE OF locationevent_id, parent_id ON locationevent FOR EACH ROW WHEN ((new.parent_id IS NOT NULL)) EXECUTE PROCEDURE locationevent__pull_forward_from_parent();
|
|
7463 |
CREATE TRIGGER locationevent__pull_forward_from_parent BEFORE INSERT OR UPDATE OF locationevent_id, parent_id ON locationevent FOR EACH ROW WHEN (((new.parent_id IS NOT NULL) AND (new.stratum_id IS NOT NULL))) EXECUTE PROCEDURE locationevent__pull_forward_from_parent();
|
|
7464 | 7464 |
|
7465 | 7465 |
|
7466 | 7466 |
-- |
Also available in: Unified diff
bugfix: schemas/vegbien.sql: locationevent: locationevent__pull_forward_from_parent() trigger: only pull forward the location_id when there is a stratum_id, so that empty locationevents that should be auto-forwarded are not unintentionally made valid by populating the location_id field (which causes a check constraint to become satisfied, and prevents auto-forwarding from working). this fixes a bug in some datasources' automated tests, such as `make inputs/SALVIAS/plotObservations/test`.