alphagov/whitehall — pull request #1869 by heathd (2014-11-25 18:22:15+00:00)
Title: Content ids for documents

https://trello.com/c/jkppwelT/46-add-content-ids-to-all-documents

Problem: In order to link to items related to a case study, all documents need to have a content ID in the content store.

This pull request
* adds `content_id` field to the `documents` table
* adds a data migration to populate the `content_id` field for historical documents
* ensures that new documents will have a `content_id` generated
* ensures that the documents transmitted to `content-store` contain the `content_id`
* adds a data migration to republish all published editions to the content store.
* This will include CaseStudies which are published in full, and other edition types which are published with a 'placeholder' format.
* these are transmitted with `update_type` of `republish`

Deployment notes:

* data migrations should be run after all of the application servers have reloaded
* note that the republishing data migration will generate a large number (approx 121,000) sidekiq jobs. This should be run on preview and monitored for load before going to production.