Mercurial > lada > lada-server
changeset 873:ad64ef3379a8
Remove unused VIEWs.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 09 Feb 2016 15:11:36 +0100 (2016-02-09) |
parents | e161d8f2d978 |
children | bf49eadf8dee |
files | db_schema/stammdaten_schema.sql |
diffstat | 1 files changed, 0 insertions(+), 242 deletions(-) [+] |
line wrap: on
line diff
--- a/db_schema/stammdaten_schema.sql Mon Feb 08 18:31:08 2016 +0100 +++ b/db_schema/stammdaten_schema.sql Tue Feb 09 15:11:36 2016 +0100 @@ -601,248 +601,6 @@ -CREATE VIEW s_00_view AS - SELECT deskriptoren.s_xx AS s00, - deskriptoren.bedeutung, - deskriptoren.beschreibung, - deskriptoren.sn - FROM deskriptoren - WHERE (deskriptoren.ebene = 0); - - - -CREATE VIEW s_01_view AS - SELECT d1.s_xx AS s01, - d2.s_xx AS s00, - d1.bedeutung, - d1.beschreibung, - d1.sn - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id))) - WHERE (d1.ebene = 1); - - - -CREATE VIEW s_02_s_01_view AS - SELECT d1.s_xx AS s01, - d2.s_xx AS s02 - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) - WHERE (d2.ebene = 2); - - - -CREATE VIEW s_02_view AS - SELECT DISTINCT deskriptoren.s_xx AS s00, - deskriptoren.bedeutung, - deskriptoren.beschreibung, - deskriptoren.sn - FROM deskriptoren - WHERE (deskriptoren.ebene = 2); - - - -CREATE VIEW s_03_s_01_view AS - SELECT d1.s_xx AS s01, - d2.s_xx AS s03 - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) - WHERE ((d2.ebene = 3) AND (d1.ebene = 1)); - - - -CREATE VIEW s_03_view AS - SELECT d1.s_xx AS s03, - d2.s_xx AS s02, - d1.bedeutung, - d1.beschreibung, - d1.sn - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id))) - WHERE ((d1.ebene = 3) AND (d2.ebene = 2)) -UNION - SELECT d1.s_xx AS s03, - NULL::integer AS s02, - d1.bedeutung, - d1.beschreibung, - d1.sn - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id))) - WHERE ((d1.ebene = 3) AND (d2.ebene = 1)); - - - -CREATE VIEW s_04_s_01_view AS - SELECT DISTINCT d1.s_xx AS s01, - d2.s_xx AS s04 - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) - WHERE (d2.ebene = 4); - - - -CREATE VIEW s_04_view AS - SELECT DISTINCT deskriptoren.s_xx AS s04, - deskriptoren.bedeutung, - deskriptoren.beschreibung, - deskriptoren.sn - FROM deskriptoren - WHERE (deskriptoren.ebene = 4); - - - -CREATE VIEW s_05_s_01_view AS - SELECT d1.s_xx AS s01, - d2.s_xx AS s05 - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) - WHERE (d2.ebene = 5); - - - -CREATE VIEW s_05_view AS - SELECT DISTINCT deskriptoren.s_xx AS s05, - deskriptoren.bedeutung, - deskriptoren.beschreibung, - deskriptoren.sn - FROM deskriptoren - WHERE (deskriptoren.ebene = 5); - - - -CREATE VIEW s_06_s_01_view AS - SELECT d1.s_xx AS s01, - d2.s_xx AS s06 - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) - WHERE (d2.ebene = 6); - - - -CREATE VIEW s_06_view AS - SELECT DISTINCT deskriptoren.s_xx AS s06, - deskriptoren.bedeutung, - deskriptoren.beschreibung, - deskriptoren.sn - FROM deskriptoren - WHERE (deskriptoren.ebene = 6); - - - -CREATE VIEW s_07_s_01_view AS - SELECT d1.s_xx AS s01, - d2.s_xx AS s07 - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) - WHERE (d2.ebene = 7); - - - -CREATE VIEW s_07_view AS - SELECT DISTINCT deskriptoren.s_xx AS s07, - deskriptoren.bedeutung, - deskriptoren.beschreibung, - deskriptoren.sn - FROM deskriptoren - WHERE (deskriptoren.ebene = 7); - - - -CREATE VIEW s_08_s_01_view AS - SELECT d1.s_xx AS s01, - d2.s_xx AS s08 - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) - WHERE (d2.ebene = 8); - - - -CREATE VIEW s_08_view AS - SELECT DISTINCT deskriptoren.s_xx AS s08, - deskriptoren.bedeutung, - deskriptoren.beschreibung, - deskriptoren.sn - FROM deskriptoren - WHERE (deskriptoren.ebene = 8); - - - -CREATE VIEW s_09_s_01_view AS - SELECT d1.s_xx AS s01, - d2.s_xx AS s09 - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) - WHERE (d2.ebene = 9); - - - -CREATE VIEW s_09_view AS - SELECT DISTINCT deskriptoren.s_xx AS s09, - deskriptoren.bedeutung, - deskriptoren.beschreibung, - deskriptoren.sn - FROM deskriptoren - WHERE (deskriptoren.ebene = 9); - - - -CREATE VIEW s_10_s_01_view AS - SELECT d1.s_xx AS s01, - d2.s_xx AS s10 - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) - WHERE (d2.ebene = 10); - - - -CREATE VIEW s_10_view AS - SELECT DISTINCT deskriptoren.s_xx AS s10, - deskriptoren.bedeutung, - deskriptoren.beschreibung, - deskriptoren.sn - FROM deskriptoren - WHERE (deskriptoren.ebene = 10); - - - -CREATE VIEW s_11_s_01_view AS - SELECT d1.s_xx AS s01, - d2.s_xx AS s11 - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) - WHERE (d2.ebene = 11); - - - -CREATE VIEW s_11_view AS - SELECT DISTINCT deskriptoren.s_xx AS s11, - deskriptoren.bedeutung, - deskriptoren.beschreibung, - deskriptoren.sn - FROM deskriptoren - WHERE (deskriptoren.ebene = 11); - - - -CREATE VIEW s_12_s_01_view AS - SELECT d1.s_xx AS s01, - d2.s_xx AS s12 - FROM (deskriptoren d1 - JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id))) - WHERE (d2.ebene = 12); - - - -CREATE VIEW s_12_view AS - SELECT DISTINCT deskriptoren.s_xx AS s12, - deskriptoren.bedeutung, - deskriptoren.beschreibung, - deskriptoren.sn - FROM deskriptoren - WHERE (deskriptoren.ebene = 12); - - - CREATE SEQUENCE staat_id_seq START WITH 1 INCREMENT BY 1