From 1a9f04aa98ec43cb3d9f5346fdd4d10953d61159 Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Tue, 1 Sep 2020 12:17:21 +0200 Subject: [PATCH] Add NTBP status information to sequences summary --- etc/db/schema-template.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/db/schema-template.sql b/etc/db/schema-template.sql index e6edbe6..f119760 100644 --- a/etc/db/schema-template.sql +++ b/etc/db/schema-template.sql @@ -401,7 +401,8 @@ CREATE VIEW _SURVEY__TEMPLATE_.raw_lines_summary AS WHERE ((preplot_points.line = rl.line) AND (((preplot_points.point >= s.fsp) AND (preplot_points.point <= s.lsp)) OR ((preplot_points.point >= s.lsp) AND (preplot_points.point <= s.fsp))))) - s.num_preplots) AS missing_shots, s.length, s.azimuth, - rl.remarks + rl.remarks, + rl.ntbp FROM (summary s JOIN _SURVEY__TEMPLATE_.raw_lines rl USING (sequence)); @@ -1146,6 +1147,7 @@ CREATE VIEW _SURVEY__TEMPLATE_.sequences_summary AS rls.remarks, fls.remarks AS remarks_final, CASE + WHEN (rls.ntbp IS TRUE) THEN 'ntbp'::text WHEN (fls.sequence IS NULL) THEN 'raw'::text ELSE 'final'::text END AS status