From e5491ae0c9cf08b95fd20b1f94fd1941e3255735 Mon Sep 17 00:00:00 2001 From: xbgmsharp Date: Wed, 8 Jan 2025 23:37:51 +0100 Subject: [PATCH] Update migration 202412 - Update api.export_logbook_geojson_point_trip_fn, fix dynamic notes for good --- initdb/99_migrations_202412.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/initdb/99_migrations_202412.sql b/initdb/99_migrations_202412.sql index aeafd15..d26b052 100644 --- a/initdb/99_migrations_202412.sql +++ b/initdb/99_migrations_202412.sql @@ -880,7 +880,7 @@ BEGIN metrics_geojson, '{1, properties}', CASE - WHEN (metrics_geojson->1->'properties'->>'notes') IS "" THEN -- it is not null but empty?? + WHEN (metrics_geojson->1->'properties'->>'notes') = '' THEN -- it is not null but empty?? (metrics_geojson->1->'properties' || second_feature_note)::jsonb ELSE metrics_geojson->1->'properties' @@ -892,7 +892,7 @@ BEGIN metrics_geojson, '{-1, properties}', CASE - WHEN (metrics_geojson->-1->'properties'->>'notes') IS "" THEN -- it is not null but empty?? + WHEN (metrics_geojson->-1->'properties'->>'notes') = '' THEN -- it is not null but empty?? (metrics_geojson->-1->'properties' || last_feature_note)::jsonb ELSE metrics_geojson->-1->'properties'