Moving existing media items to new upload path structure not updating full URL path

The relative path, including the date directories, is stored in the postmeta for the attachment’s post, using the _wp_attached_file meta_key.

If you examine the data for that key, you’ll find that the meta_value is 2012/08/example.jpg or something similar to that. This is used to build the URL.