Sha256: 7288bce648da37883a6e58c19551f3c153ffc3e0036cb9ba7c653f32ce07bc61
Contents?: true
Size: 349 Bytes
Versions: 32
Compression:
Stored size: 349 Bytes
Contents
class RevenueAppliesAt < ActiveRecord::Migration def change add_column :orders, :revenue_applies_at, :datetime, :default => Time.now, :null => false execute "update orders set revenue_applies_at=created_at" ExchangeOrder.find_each do |order| order.update_column(:revenue_applies_at, order.originally_sold_at) end end end
Version data entries
32 entries across 32 versions & 1 rubygems