Task.file_id is NULL while it shouldn't
We received at least 2 different reports of a constraint violation that occurs when inserting a playlist File in DB.
In those DBs, all tasks associated with a playlist have a file_id set to NULL. This causes the file insertion to kick in, but as expected, since the file exists, the insertion is refused and a ContraintViolation is thrown.
[ParserWorker: Request [INSERT INTO File(playlist_id, mrl, type, folder_id, last_modification_date, size, is_removable, is_external, is_network) VALUES(?, ?, ?, ?, ?, ?, ?, 0, ?)] aborted due to constraint violation (UNIQUE constraint failed: File.mrl, File.folder_id)]
This seems to be happen for all playlists when it happens, so I really doubt this is a sporadic failure when updating the Task's file_id. However, the code to update the file_id when creating a playlist & its file is part of a transaction, so if we manage to create a playlist & file, we should have the file_id updated as well.
This is likely to be caused by a migration that updated the file_id
field in an invalid way.