Sha256: 2f3e23247c51a7359140341982634f7231f5a1a784ff0103a8b5269ef11bfc20
Contents?: true
Size: 358 Bytes
Versions: 35
Compression:
Stored size: 358 Bytes
Contents
class PopulateLegacyShipmentState < ActiveRecord::Migration def up shipments = select_all "SELECT * FROM shipments" shipments.each do |shipment| if shipment['shipped_at'] execute "UPDATE shipments SET state = 'shipped'" else execute "UPDATE shipments SET state = 'pending'" end end end def down end end
Version data entries
35 entries across 35 versions & 3 rubygems