class AddLinksToTravelAdvice < ActiveRecord::Migration
  def change
    Link.find_each("passthrough_hash IS NOT NULL") do |link|
      link.update_attributes!(target_content_id: link.passthrough_hash[:content_id])
    end
  end
end

Move passthrough hash content id to the target link
Move passthrough hash content id to the target link

This copies the content id in the passthrough hash so when we drop this
column we don't lose any behaviour. Dependency resolution acts in the
same way, and produces the same structure.
