comparison artifacts/doc/conf/meta-data.xml @ 8072:5f28aa1be795

SCHEMA CHANGE: rename database tables from yield to load_ls according to respective classes.
author Tom Gottfried <tom@intevation.de>
date Wed, 06 Aug 2014 19:17:12 +0200
parents b57ecf80e40c
children 1c57c9dc1661
comparison
equal deleted inserted replaced
8071:6e6506ec0ae0 8072:5f28aa1be795
1484 </dc:if> 1484 </dc:if>
1485 </dc:macro> 1485 </dc:macro>
1486 1486
1487 <dc:macro name="yields"> 1487 <dc:macro name="yields">
1488 <yields> 1488 <yields>
1489 <dc:call-macro name="annotations_sediment_yield"/> 1489 <dc:call-macro name="annotations_sediment_load_ls"/>
1490 <years> 1490 <years>
1491 <dc:context> 1491 <dc:context>
1492 <dc:statement> 1492 <dc:statement>
1493 SELECT DISTINCT 1493 SELECT DISTINCT
1494 sy.id AS syid, 1494 sy.id AS syid,
1495 sy.description AS description, 1495 sy.description AS description,
1496 ti.start_time AS year, 1496 ti.start_time AS year,
1497 gf.name AS fraction 1497 gf.name AS fraction
1498 FROM sediment_yield sy 1498 FROM sediment_load_ls sy
1499 JOIN rivers r ON sy.river_id = r.id 1499 JOIN rivers r ON sy.river_id = r.id
1500 JOIN sediment_yield_values syv ON sy.id = syv.sediment_yield_id 1500 JOIN sediment_load_ls_values syv ON sy.id = syv.sediment_load_ls_id
1501 JOIN time_intervals ti ON sy.time_interval_id = ti.id 1501 JOIN time_intervals ti ON sy.time_interval_id = ti.id
1502 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id 1502 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id
1503 WHERE r.id = ${river_id} 1503 WHERE r.id = ${river_id}
1504 AND ti.stop_time IS NULL 1504 AND ti.stop_time IS NULL
1505 AND syv.station BETWEEN ${fromkm} AND ${tokm} 1505 AND syv.station BETWEEN ${fromkm} AND ${tokm}
1517 sy.id AS syid, 1517 sy.id AS syid,
1518 sy.description AS description, 1518 sy.description AS description,
1519 ti.start_time AS startyear, 1519 ti.start_time AS startyear,
1520 ti.stop_time AS endyear, 1520 ti.stop_time AS endyear,
1521 gf.name AS fraction 1521 gf.name AS fraction
1522 FROM sediment_yield sy 1522 FROM sediment_load_ls sy
1523 JOIN rivers r ON sy.river_id = r.id 1523 JOIN rivers r ON sy.river_id = r.id
1524 JOIN sediment_yield_values syv ON sy.id = syv.sediment_yield_id 1524 JOIN sediment_load_ls_values syv ON sy.id = syv.sediment_load_ls_id
1525 JOIN time_intervals ti ON sy.time_interval_id = ti.id 1525 JOIN time_intervals ti ON sy.time_interval_id = ti.id
1526 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id 1526 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id
1527 WHERE r.id = ${river_id} 1527 WHERE r.id = ${river_id}
1528 AND ti.stop_time IS NOT NULL 1528 AND ti.stop_time IS NOT NULL
1529 AND syv.station BETWEEN ${fromkm} AND ${tokm} 1529 AND syv.station BETWEEN ${fromkm} AND ${tokm}
1573 </dc:for-each> 1573 </dc:for-each>
1574 </dc:context> 1574 </dc:context>
1575 </annotations> 1575 </annotations>
1576 </dc:macro> 1576 </dc:macro>
1577 1577
1578 <dc:macro name="annotations_sediment_yield"> 1578 <dc:macro name="annotations_sediment_load_ls">
1579 <sources_sinks> 1579 <sources_sinks>
1580 <dc:context> 1580 <dc:context>
1581 <dc:statement> 1581 <dc:statement>
1582 SELECT id AS anno_id, 1582 SELECT id AS anno_id,
1583 name AS anno_description 1583 name AS anno_description

http://dive4elements.wald.intevation.org