alphagov/whitehall — pull request #1161 by tekin (2013-12-16 13:21:12+00:00)
Title: 62252064 unique attachment filenames

Tracker: https://www.pivotaltracker.com/story/show/62252064

The bulk of this work is in the data migration that renames and replaces attachment files that share a filename on a given attachable model. This is done using the "replaced_by" mechanism on the `AttachmentData` model so that requests to the old attachment files are automatically redirected. Attachments are renamed and replaced on the following models:

* Published editions
* Consultation responses
* Policy advisory groups
* Corporate information pages

Published editions are re-editioned and published as a minor change with a editorial remark indicating what happened. If a newer draft is present, then the edition is skipped and these editions will need to be manually fixed.