From ee5053959154b1a2e5fbe4b43162968425206a26 Mon Sep 17 00:00:00 2001 From: Benjamin Bellamy <ben@podlibre.org> Date: Mon, 31 Jan 2022 16:49:26 +0000 Subject: [PATCH] fix(analytics): set initial value for duration and bandwidth --- .../2017-12-01-210000_add_analytics_podcasts_procedure.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_podcasts_procedure.php b/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_podcasts_procedure.php index 18a9276e43..b69bf127b6 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_podcasts_procedure.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_podcasts_procedure.php @@ -50,8 +50,8 @@ class AddAnalyticsPodcastsProcedure extends Migration SET @current_hour = HOUR(@current_datetime); IF NOT `p_bot` THEN - INSERT INTO `{$prefix}analytics_podcasts`(`podcast_id`, `date`) - VALUES (p_podcast_id, @current_date) + INSERT INTO `{$prefix}analytics_podcasts`(`podcast_id`, `date`, `duration`, `bandwidth`) + VALUES (p_podcast_id, @current_date, `p_duration`, `p_filesize`) ON DUPLICATE KEY UPDATE `duration`=`duration`+`p_duration`, `bandwidth`=`bandwidth`+`p_filesize`, -- GitLab