Mercurial > lada > lada-server
comparison db_schema/stammdaten_schema.sql @ 879:6bd149c352a9
Available status values need to be filtered by the users functions.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 11 Feb 2016 16:23:38 +0100 |
parents | ad64ef3379a8 |
children | fa7278bd8d73 |
comparison
equal
deleted
inserted
replaced
878:9cf4b2ac3e2a | 879:6bd149c352a9 |
---|---|
723 ALTER TABLE status_reihenfolge ALTER COLUMN id DROP DEFAULT; | 723 ALTER TABLE status_reihenfolge ALTER COLUMN id DROP DEFAULT; |
724 DROP SEQUENCE status_reihenfolge_id_seq; | 724 DROP SEQUENCE status_reihenfolge_id_seq; |
725 | 725 |
726 | 726 |
727 CREATE VIEW status_erreichbar AS ( | 727 CREATE VIEW status_erreichbar AS ( |
728 SELECT DISTINCT k.wert_id, | 728 SELECT r.id, |
729 j.wert_id AS cur_wert, | 729 zu.wert_id, |
730 j.stufe_id AS cur_stufe | 730 zu.stufe_id, |
731 FROM stammdaten.status_kombi k | 731 von.wert_id AS cur_wert, |
732 JOIN (SELECT r.zu_id, | 732 von.stufe_id AS cur_stufe |
733 kom.wert_id, | 733 FROM stammdaten.status_reihenfolge r |
734 kom.stufe_id | 734 JOIN stammdaten.status_kombi von |
735 FROM stammdaten.status_reihenfolge r | 735 ON von.id = r.von_id |
736 JOIN stammdaten.status_kombi kom | 736 JOIN stammdaten.status_kombi zu |
737 ON kom.id = r.von_id) j | 737 ON zu.id = r.zu_id |
738 ON j.zu_id = k.id | |
739 ); | 738 ); |
740 -- Status workflow | 739 -- Status workflow |
741 | 740 |
742 | 741 |
743 CREATE TABLE umwelt ( | 742 CREATE TABLE umwelt ( |