From 6e3bb4b426e03d037e1bec3fd3fc126243731109 Mon Sep 17 00:00:00 2001 From: Bernardo Giordano Date: Sat, 3 Jan 2026 18:39:56 +0100 Subject: [PATCH] Migrate old scrobbles with NULL duration rather than 0 Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- .../20260103120000_add_id_and_duration_to_scrobbles.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrations/20260103120000_add_id_and_duration_to_scrobbles.sql b/db/migrations/20260103120000_add_id_and_duration_to_scrobbles.sql index 46fe146d8..dd2516b19 100644 --- a/db/migrations/20260103120000_add_id_and_duration_to_scrobbles.sql +++ b/db/migrations/20260103120000_add_id_and_duration_to_scrobbles.sql @@ -17,7 +17,7 @@ CREATE TABLE scrobbles_new( ); INSERT INTO scrobbles_new (id, media_file_id, user_id, submission_time, duration) -SELECT lower(hex(randomblob(16))), media_file_id, user_id, submission_time, 0 FROM scrobbles; +SELECT lower(hex(randomblob(16))), media_file_id, user_id, submission_time, NULL FROM scrobbles; DROP TABLE scrobbles; ALTER TABLE scrobbles_new RENAME TO scrobbles;