WordPress allows you to upload files (such as images) and include them in posts. These end up in a location such as .../wp-content/uploads/2012/06/githuboctocat.jpeg.
I’m trying to keep things simple (for now), so I want all the uploaded files in one folder, with no fancy way of managing the files, and with only one version of each image (no thumbnails). So the above file would move to .../uploads/githuboctocat.jpeg.
I didn’t want this folder to be part of the application code, so (following this) I added the following to deploy.rb:
Next, with the uploaded files in that new folder, the database needed to be migrated to change the URLs for the uploaded files. The following migration seems to work (and can be rolled back, as long as the uploaded files shares the same year and month as the post that refers to it):