Commit Graph

461 Commits

Author SHA1 Message Date
xbgmsharp
8fe84ea80c Update migration 202507
- Update plugin upgrade message
- Update api.login, update the connected_at field to the current time
- Update monitoring_history_fn to use custom user settings for metrics
- Update cron_alerts_fn to check for alerts, filters out empty strings (""), so they are not included in the result.
- Update process_pre_logbook_fn to detect and avoid logbook we more than 1000NM in less 15h
2025-08-02 16:07:29 +02:00
xbgmsharp
54eefe582d Update migration 202505
- Update monitoring view to with true wind speed
2025-08-02 11:31:32 +02:00
xbgmsharp
b7efb9636f Release 0.9.2 2025-06-15 22:22:55 +02:00
xbgmsharp
14d19a5394 Update migration 202505.
- Update metadata_ext table add REFERENCES and image_url
- Add stays_ext, new table to store vessel extended stays from user
- Update metadata_update_configuration_trigger, make sure it runs only when need.
- Create update_stays_ext_decode_base64_image_trigger_fn to decode base64 image
- Update function public.autodiscovery_config_fn and cron_process_autodiscovery_fn, hanlde no metric available
- Create api.stays_image to fetch stays image
- Update api.vessel_image to fetch boat image
- Update public.stay_active_geojson_fn function to produce a GeoJSON with the last position and stay details and anchor details
- Update api.monitoring_live, add anchor support
- Create view api.noteshistory_view, List stays and moorages notes order by stays
- Udpate public.process_stay_queue_fn, replace '0 day' stay name by 'short stay' name
- Create view api.logs_geojson_view, List logs with geojson
- Create view api.moorages_geojson_view, List moorages with geojson
- Create api.export_vessel_geojson_fn, export vessel as geojson
- Update api.export_logbook_geojson_linestring_trip_fn, add more trip properties to geojson
- Update api.export_logbook_geojson_trip_fn, add more trip properties to geojson
- Update api.export_logbooks_geojson_linestring_trips_fn, add more trip properties to geojson
- Update TABLE api.stays_ext with ROW LEVEL SECURITY
2025-06-15 22:13:53 +02:00
xbgmsharp
f528456c08 Update migration 202505.
- Create trigger to process metadata for autodiscovery_config provisioning
- Create function public.autodiscovery_config_fn, to generate autodiscovery monitoring configuration
- Create cron_process_autodiscovery_fn to process autodiscovery config provisioning
- Refactor metadata_upsert_trigger_fn with the new metadata schema, remove id and check valid mmsi.
- Update email_templates table, add new autodiscovery template
2025-05-25 15:49:05 +02:00
xbgmsharp
25c74fd75a Update migration 202505
- Update metadata table coluonm type MMSI to text
- Update metadata upsert trigger, to ignore non-valid mmsi
- Update api.monitoring_live, fix invalid path tipo
- Update public.logbook_update_metrics_timebucket_fn, fix invalid path tipo and query
- Update public.logbook_update_metrics_fn, fix invalid path tipo
- Update public.logbook_update_metrics_short_fn, fix invalid path tipo
2025-05-20 21:58:00 +02:00
xbgmsharp
fa45782553 Update migration query order 2025-05-19 23:32:02 +02:00
xbgmsharp
dcf4eaca9b Add migration 202505
- Update metadata table, add IP address column, remove id column, update vessel_id default
- Add metadata_ext, new table to store vessel extended metadata from user
- Cleanup trigger on api schema, Move trigger on public schema
- Create trigger to update polar_updated_at and image_updated_at accordingly
- Create update_metadata_ext_decode_base64_image_trigger_fn to decode base64 image
- Refactor metadata_upsert_trigger_fn with the new metadata schema, remove id.
- Update metadata_grafana_trigger_fn with the new metadata schema, remove id.
- Create api.vessel_image to fetch vessel image
- Create api.vessel_extended_fn() to expose extended vessel details
- Update api.vessel_details_fn to use configuration metadata
- Update api.vessel_fn to use metadata_ext
- Update public.stay_active_geojson_fn function to produce a GeoJSON with the last position and stay details
- Update monitoring view to support live moorage in GeoJSON
- Update public.overpass_py_fn to check for seamark with name
- Update api.export_logbooks_geojson_linestring_trips_fn, add extra, _to_moorage_id, _from_moorage_id metadata
- Update api.monitoring_live, add live tracking view, Add support 6h outside barometer
- Update public.logbook_update_metrics_short_fn, aggregate more metrics and use user configuration
- Update public.logbook_update_metrics_fn, aggregate more metrics and use user configuration
- Update public.logbook_update_metrics_timebucket_fn, aggregate more metrics and use user configuration
- Update public.process_logbook_queue_fn to use new mobilitydb metrics
- Remove unnecessary functions
- Add missing comments on function
- Update public.cron_process_monitor_online_fn, refactor of metadata
- Update public.cron_process_monitor_offline_fn, Refactor metadata
- Update public.cron_process_grafana_fn, Refactor metadata
- Update permissions and RLS
- Update cron_process_skplugin_upgrade_fn, update check for signalk plugin version
2025-05-19 23:19:04 +02:00
xbgmsharp
13f8240838 Release 0.9.1-202504 2025-05-04 22:41:27 +02:00
xbgmsharp
29cc40f6de Update SQL comments 2025-05-04 22:32:42 +02:00
xbgmsharp
d8ef8b8958 Add migration 202504
- Install and update TimescaleDB Toolkit
- Remove deprecated client_id
- Remove index from logbook columns
- Remove deprecated column from api.logbook
- Add new mobilityDB support with comments
- Update api.export_logbook_geojson_linestring_trip_fn, add more metadata properties
- Update public.check_jwt, Make new mobilitydb export geojson function anonymous access
- Create api.monitoring_upsert_fn, the function that update api.metadata monitoring configuration
- Update cron_process_skplugin_upgrade_fn, update check for signalk plugin version
- Update api.find_log_from_moorage_fn using the mobilitydb trajectory
- Update api.find_log_to_moorage_fn using the mobilitydb trajectory
- Update api.eventlogs_view to fetch the events logs backwards and skip the new_stay
- Update api.stats_logs_fn, ensure the trip is completed
- Update api.stats_fn, ensure the trip is completed
- Update moorage_delete_trigger_fn, When morrage is deleted, delete process_queue references as well.
- Create public.logbook_delete_trigger_fn, When logbook is deleted, logbook_ext need to deleted as well.
- Update metadata table, mark client_id as deprecated
- Update public.process_lat_lon_fn, Add new moorage refrence in public.process_queue for event logs review
- Add Description on missing trigger
- Update public.logbook_active_geojson_fn, fix log_gis_line as there is no end time yet
- Create public.stay_active_geojson_fn function to produce a GeoJSON with the last position and stay details
- Update monitoring view to support live moorage in GeoJSON
- Add api.monitoring_live view, the live tracking view
- Refresh permissions
2025-05-04 22:23:00 +02:00
xbgmsharp
7744ad4af9 Release 0.9.0-202503 2025-03-31 17:38:52 +02:00
xbgmsharp
f285fcddb0 Add migration 202503
- Update metadata table, mark client_id as deprecated
- Update metadata table update configuration column type to jsonb
- Update metadata table add new column available_keys
- Update metadata_upsert_trigger_fn to metadata table
- Add metadata table tigger for update_metadata_configuration
- Update api.export_logbook_geojson_linestring_trip_fn, add metadata
- Add public.get_season, return the season based on the input date for logbook tag
- Refresh permissions
2025-03-31 13:34:39 +02:00
xbgmsharp
0c76edf793 Update tests 2025-01-16 10:31:20 +01:00
xbgmsharp
9e9189ac36 Update migration 202412:
- Update public.logbook_update_metrics_short_fn, handle corner use case
- Update public.logbook_update_metrics_fn, handle corner use case
- Update public.logbook_update_metrics_timebucket_fn, handle corner use case
2025-01-16 08:59:50 +01:00
xbgmsharp
5409f1eec9 Update migration 202412:
- Update api.export_logbooks_geojson_point_trips_fn,
- Update export_logbook_geojson_trip_fn, update geojson from trip to geojson with more properties
2025-01-09 21:19:45 +01:00
xbgmsharp
e5491ae0c9 Update migration 202412
- Update api.export_logbook_geojson_point_trip_fn, fix dynamic notes for good
2025-01-08 23:37:51 +01:00
xbgmsharp
1b57641e7d Update migration 202412
- Update api.export_logbook_geojson_point_trip_fn, fix dynamic notes
2025-01-08 23:30:44 +01:00
xbgmsharp
aa7608e07e Update migration 202412
- Update api.stats_fn, due to reference_count and stay_duration columns removal
- Update api.stats_stays_fn, due to reference_count and stay_duration columns removal
- Update log_view with dynamic GeoJSON, change geojson export fn
- Update delete_trip_entry_fn, support additional temporal sequence columns (depth,etc...)
- Update export_logbook_geojson_trip_fn, update geojson from trip to geojson additional temporal sequence columns (depth,etc...)
- Update api.export_logbook_geojson_point_trip_fn, update geojson from trip to geojson additional temporal sequence columns (depth,etc...)
2025-01-08 23:17:06 +01:00
xbgmsharp
9575eba043 Release 0.8.1-202412 2025-01-06 09:06:45 +01:00
xbgmsharp
3a035f3519 Update migration 202412
- Remove deprecated column from api.moorages
- Update api.moorage_view, due to stay_duration column removal
- Update stats_moorages_view, due to stay_duration column removal
- Update stats_moorages_away_view, due to stay_duration column removal
2025-01-05 18:01:50 +01:00
xbgmsharp
1355629c4e Add migration 202412
- Full support for MobilityDB
- Add new mobilityDB support
- Remove deprecated column from api.logbook
- Update public.logbook_update_metrics_short_fn, aggregate more metrics
- Update public.logbook_update_metrics_fn, aggregate more metrics
- Update public.logbook_update_metrics_timebucket_fn, aggregate more metrics
- Update api.merge_logbook_fn, add support for mobility temporal type
- Update export_logbook_geojson_trip_fn, update geojson from trip to geojson
- Create api.export_logbook_geojson_point_trip_fn, transform spatiotemporal trip into a geojson with the corresponding properties
- Update public.process_lat_lon_fn remove deprecated moorages columns
- Update logbook table, add support for mobility temporal type
- Update public.badges_geom_fn remove track_geom and use mobilitydb trajectory
- Update public.process_stay_queue_fn remove calculation of stay duration and count
- Update public.badges_moorages_fn remove calculation of stay duration and count
- Update api.find_log_from_moorage_fn using the mobilitydb trajectory
- Update api.find_log_to_moorage_fn using the mobilitydb trajectory
- Update api.delete_logbook_fn to delete moorage dependency using mobilitydb
- Update public.qgis_bbox_py_fn to use mobilitydb trajectory
- Update public.qgis_bbox_trip_py_fn to use mobilitydb trajectory
2025-01-05 17:37:33 +01:00
xbgmsharp
c51059a431 Update migration 202411
Update public.logbook_update_metrics_fn, aggregate metrics by time-series to reduce size
2024-12-07 12:05:51 +01:00
xbgmsharp
9be725fa24 Release 0.8.0-202411 2024-12-06 12:47:23 +01:00
xbgmsharp
40675a467e Update migration 202411
Force timestamp cast
2024-12-06 12:46:36 +01:00
xbgmsharp
0c0071236e Update migration 202411. update comments. 2024-12-03 21:08:42 +01:00
xbgmsharp
23d3586a2c Update migration 202411
-- Add MobilityDB support
-- Update logbook tbl, add trip from mobilitydb
-- Update logbook table, add support for mobility temporal type
-- Add api.export_logbook_geojson_linestring_trip_fn, transform spatiotemporal trip into a geojson with the corresponding properties
-- Add api.export_logbook_geojson_point_trip_fn, transform spatiotemporal trip into a geojson with the corresponding properties
-- Add logbook_update_geojson_trip_fn, update geojson from trip to geojson
-- Add api.export_logbook_gpx_trip_fn, update gpx from a trip
-- Add api.export_logbook_kml_trip_fn, update kml from a trip
-- Add api.export_logbook_geojson_linestring_trip_fn, replace timelapse_fn, transform spatiotemporal trip into a geojson with the corresponding properties
-- Add export_logbooks_geojson_point_trips_fn, replace timelapse2_fn, Generate the GeoJSON from the time sequence value
-- Add export_logbook_geojson_trip_fn, update geojson from trip to geojson
-- Update api.export_logbooks_gpx_trips_fn
-- Update api.export_logbooks_kml_trips_fn
-- Add update_trip_notes_fn, add temporal sequence into a trip notes
-- Add delete_trip_entry_fn, delete temporal sequence into a trip
-- Update log_view with dynamic GeoJSON from trip
-- Update api.vessels_view
-- Update api.versions_fn(), add mobilitydb
-- Update metrics_trigger_fn, Ignore entry if new time is in the future.
-- Update Monitor offline, check metadata tbl and metrics tbl, reduce flapping
-- Update moorages_view, make arrivals&departure and total_duration computed data
-- Update moorage_view, make arrivals&departure and total_duration computed data, add total visits
-- Update moorages map, use api.moorage_view as source table
-- Update mapgl_fn, refactor function using existing function
-- Update api.export_moorages_gpx_fn, use moorage_view as source to include computed data
-- Add api.export_moorages_kml_fn, export all moorages as kml
-- Update public.process_pre_logbook_fn, update stationary detection, if we have less than 20 metrics or less than 0.5NM or less than avg 0.5knts
-- Update api.export_logbook_kml_fn
-- Allow users to update certain columns on specific TABLES on API schema
-- Refresh user_role permissions
2024-12-02 21:46:05 +01:00
xbgmsharp
f72d6b9859 Update migration 202410
- Cleanup public.update_logbook_with_geojson_trigger_fn
2024-11-03 21:46:01 +01:00
xbgmsharp
3e30709675 Release 0.7.8-202410 2024-11-03 21:39:07 +01:00
xbgmsharp
60e0097540 Add migration 202410
- Update moorages map, export more properties (notes,reference_count) from moorages tbl
- Update mapgl_fn, update moorages map sub query to export more properties (notes,reference_count) from moorages tbl
- Update logbook_update_geojson_fn, fix corrupt linestring properties
- Add trigger to update logbook stats from user edit geojson
- Add trigger on logbook update to update metrics from track_geojson
2024-11-03 21:36:20 +01:00
xbgmsharp
3038821353 Release 0.7.7-202409 2024-10-13 10:31:51 +02:00
xbgmsharp
051408a307 Update migration 202409 2024-10-13 10:04:55 +02:00
xbgmsharp
2f7439d704 Add migration 202409
- Add new email template account_inactivity
- Update HTML email for new logbook
- Update stats_logs_fn, update debug
- Fix stays and moorage statistics for user by date
- Update api.stats_moorages_view, fix time_spent_at_home_port
- Add stats_fn, user statistics by date
- Add mapgl_fn, generate a geojson with all logs as linestring
- Add cron_inactivity_fn, cleanup all data for inactive users and vessels
- Add cron_deactivated_fn, delete all data for inactive users and vessels
- Remove unused and duplicate function, cron_process_no_activity_fn
2024-10-13 09:42:18 +02:00
xbgmsharp
0a80f2e35e Release 0.7.6-202408 2024-09-04 12:58:48 +02:00
xbgmsharp
e301e6fedd - Update public.process_post_logbook_fn, Add logbook_stats 2024-09-04 12:31:25 +02:00
xbgmsharp
57cf87fbe9 Add migration 202408
- Update public.process_lat_lon_fn, Ensure name without double quote, Fix issue with when string contains quote
- Update public.qgis_bbox_trip_py_fn, Add error handling for invalid argument
- Update public.qgis_bbox_py_fn, Add error handling for invalid argument
- Update public.get_app_settings_fn, Add new qgis and video URLs settings
- Update public.process_post_logbook_fn, Remove qgis dependency, Add logbook_stats
- Update public.cron_alerts_fn, Update alert message. Add the date and format the numeric value
- Update public.metrics_trigger_fn, CleanUp DEBUG print, ensure only one "new_stay" insert.
- Update public.check_jwt, reset config value Set default settings to avoid sql shared session cache for every new HTTP request
- Update public.send_email_py_fn, Update HTML email for new logbook email
- Update deactivated email template
- Update new logbook email template
- Update role authenticator, set api role SQL connection to 30
- Update table auth.vessels, Remove CONSTRAINT unique email for vessels table, Create new index for vessels table
2024-09-04 12:17:25 +02:00
xbgmsharp
6045ff46c0 Update comments 2024-08-08 10:11:41 +02:00
xbgmsharp
e857440133 Release 0.7.5-202407 2024-07-31 11:16:38 +02:00
xbgmsharp
0a13e0a798 Add migration 202407
- Add video error notification message
- Add CRON for new video notification
- Update public.cron_alerts_fn, Fix error when stateOfCharge is null. Make stateOfCharge null value assume to be charge 1.
- Update api.export_logbooks_gpx_fn, Fix error: None of these media types are available: text/xml
- Add export logbooks as png from webserver
- Update grafana provisioning, ERROR:  KeyError: 'secureJsonFields'
- Add missing comment on function cron_process_no_activity_fn
- Update grafana role SQL connection to 30
- Create qgis schema for qgis projects
- Update video cronjob
2024-07-30 15:53:26 +02:00
xbgmsharp
8fe0513c3c Add new env for qgis and maplapse 2024-07-30 15:52:59 +02:00
xbgmsharp
5cefe47fea Release 0.7.4-202406 2024-07-19 09:52:18 +02:00
xbgmsharp
6bbe9795fb Update the 202406 migration.
- Update grafana role SQl connection to 30
- Alter moorages table with default duration of 0. Affect views
- Update moorage_view to default with duration of 0
- Create a every 15 minutes for cron_process_new_video_fn
- Update video_ready email template
- Reduce debug on public.qgis_getmap_py_fn
- Update public.qgis_bbox_py, add more parameters to allow use case.
- Create role qgis_role with RLS
- Create role maplapse_role with RLS
- Update notification, add video link and log image link for public.send_email_py_fn, public.send_pushover_py_fn, public.send_telegram_py_fn
2024-07-16 17:00:55 +02:00
xbgmsharp
c726f6cc07 Add migration 202406
- Add video timelapse notification message. Initial implementation
- Add public.qgis_getmap_py_fn to generate and request the logbook image url to be cache on QGIS server
- Add public.qgis_bbox_py_fn to generate the logbook extent for the logbook image to access the QGIS server
- Add qgis_role user and role
- Upadate public.send_email_py_fn, Add support for HTML email for logbook with qgis image
- Update api.vessel_fn, expose vessel_id to generate logbook with qgis image url
- Add process_post_logbook_fn, QGIS is handle in post with notification
- Add cron_process_post_logbook_fn
- Update api.eventlogs_view, exclude post_logbook
- Add new cron job cron_post_logbook
2024-06-09 20:14:31 +02:00
xbgmsharp
48647e5978 Update the 202405 migration.
- Update process_logbook_queue_fn
- Add missing comment on function
- Update cron_process_grafana_fn
- Drop metadata_ip_trigger
2024-06-09 20:10:47 +02:00
xbgmsharp
1702b825c7 Update migration 202405.
Update logbook_timelapse_geojson_fn, ensure we fetch the processed logbook data
Update tbl metadata trigger, Add Ip tracking per vessel to avoid abuse
Add public.logbook_active_geojson_fn, return the current trip and last coords
Update api.monitoring_view, add live tracking and add more properties to geojson
Update public.cron_process_grafana_fn, ensure vessle name is not null when not present in signalk
2024-05-23 21:31:46 +02:00
xbgmsharp
3c4f68218f Update the 202405 migration.
- Updaete public.process_logbook_queue_fn, refactor and cleanup code
- Update public.logbook_update_geojson_fn, Add avg_wind_speed to logbook geojson, Add back truewindspeed and truewinddirection to logbook geojson
- Add public.logbook_timelapse_geojson_fn, Add properties to the geojson for timelapse purpose
2024-05-16 23:44:46 +02:00
xbgmsharp
42e85cc498 Update the 202405 migration. Fix again trip details name in the geojson 2024-05-16 21:54:03 +02:00
xbgmsharp
bd9b207d43 Update the 202405 migration. Add again trip details name in the geojson 2024-05-16 21:27:53 +02:00
xbgmsharp
c588fc676c Update migration 202405
- Update api.login add user ip to track multi-user accounts
- Update signalk plugin message
- Update cron job signalk plugin
2024-05-16 10:29:47 +02:00
xbgmsharp
23d2ced60c Add migration 202405.
- Update logbook_update_avg_fn, Update a logbook with avg wind speed
- Update api.logs_view, Add tags to view
- Update api.moorages_stays_view, Add moorage name to view
- Add a merge_logbook_fn
- Update api.login, add support for disable user
- Add Notifications/Reminders for old signalk plugin
2024-05-14 21:22:36 +02:00