Update metadata tests, ensure a reuslt for api.metadata.configuration base on update_at value

This commit is contained in:
xbgmsharp
2025-04-21 23:42:12 +02:00
parent 86bd4b5843
commit 06fd834441

View File

@@ -29,4 +29,4 @@ UPDATE api.metadata SET configuration = '{ "depthKey": "environment.depth.belowT
select configuration->'depthKey' AS depthKey, configuration->'update_at' IS NOT NULL AS update_at from api.metadata WHERE vessel_id = current_setting('vessel.id', false);
\echo 'api.metadata get configuration base on update_at value'
select configuration->'depthKey' AS depthKey, configuration->'update_at' IS NOT NULL AS update_at from api.metadata WHERE vessel_id = current_setting('vessel.id', false) AND configuration->>'update_at' = to_char(NOW(), 'YYYY-MM-DD"T"HH24:MI:SS"Z"');
select configuration->'depthKey' AS depthKey, configuration->'update_at' IS NOT NULL AS update_at from api.metadata WHERE vessel_id = current_setting('vessel.id', false) AND configuration->>'update_at' <= to_char(NOW(), 'YYYY-MM-DD"T"HH24:MI:SS"Z"');