-- Fix completed column type
ALTER TABLE listening_history ALTER COLUMN completed TYPE BOOLEAN USING CASE WHEN completed = 1 THEN TRUE ELSE FALSE END;

-- Add comment
COMMENT ON COLUMN listening_history.completed IS 'Whether the track was listened to completion';
