Skip to content

Instantly share code, notes, and snippets.

@jonstorer
Last active December 17, 2015 23:09
Show Gist options
  • Save jonstorer/5687163 to your computer and use it in GitHub Desktop.
Save jonstorer/5687163 to your computer and use it in GitHub Desktop.
Migrate all Win documents to PrizeWin documents
CashstarFulfillment.all.each do |cf|
cf.set(:prize_win_id, cf.win_id)
end
Win.all.each do |win|
win.set(:_type, 'PrizeWin')
end
CashstarFulfillment.all.each do |cf|
cf.unset(:win_id)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment