Sha256: f46c53052a33643264fcb7e07065cc32de448d27f9ad2f3002a653a204826eea

Contents?: true

Size: 399 Bytes

Versions: 7

Compression:

Stored size: 399 Bytes

Contents

# This migration comes from spree (originally 20101008190536)
class MoveSpecialInstructionsToOrders < ActiveRecord::Migration
  def up
    add_column :orders, :special_instructions, :text
    execute "UPDATE orders SET special_instructions = (SELECT special_instructions FROM checkouts WHERE order_id = orders.id)"
  end

  def down
    remove_column :orders, :special_instructions, :text
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
spree_mercado_pago_payment_method-0.0.2 spec/dummy/db/migrate/20121121030200_move_special_instructions_to_orders.spree.rb
spree_mercado_pago_payment_method-0.1.1 spec/dummy/db/migrate/20121121030200_move_special_instructions_to_orders.spree.rb
spree_mercado_pago_payment_method-0.1.0 spec/dummy/db/migrate/20121121030200_move_special_instructions_to_orders.spree.rb
datashift_spree-0.3.0 spec/sandbox/db/migrate/20121023154419_move_special_instructions_to_orders.spree.rb
datashift_spree-0.2.1 spec/sandbox/db/migrate/20121015151212_move_special_instructions_to_orders.spree.rb
datashift_spree-0.2.0 spec/sandbox/db/migrate/20120925192780_move_special_instructions_to_orders.spree.rb
datashift_spree-0.1.0 spec/sandbox/db/migrate/20120918081511_move_special_instructions_to_orders.spree.rb