Sha256: 39e5db9c74b67eb787b6dc1d5c10a314cf0387adf4b392116ce5932be0afe96a
Contents?: true
Size: 379 Bytes
Versions: 55
Compression:
Stored size: 379 Bytes
Contents
class MoveSpecialInstructionsToOrders < ActiveRecord::Migration def self.up add_column :orders, :special_instructions, :text ActiveRecord::Base.connection.execute("update orders set special_instructions = (select special_instructions from checkouts where order_id = orders.id)") end def self.down remove_column :orders, :special_instructions, :text end end
Version data entries
55 entries across 43 versions & 9 rubygems