class UpdateFormatToDualSpecialistPublisher < ActiveRecord::Migration
  def change
    ContentItem.where(document_type: ['specialist_document', 'placeholder_specialist_document'])
      .update_all("document_type = (details #>> '{metadata,document_type}')")
  end
end

Set document_type of specialist documents to be more specific
Set document_type of specialist documents to be more specific

Specialist publisher has a separate document_type from schema
name. Currently, these are set to the same thing. This
migration sets the document_type from details.metadata.document_type
