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

Version Path
spree_core-0.70.7 db/migrate/20101008190536_move_special_instructions_to_orders.rb
spree_core-0.70.6 db/migrate/20101008190536_move_special_instructions_to_orders.rb
apispree_core-0.0.0 db/migrate/20101008190536_move_special_instructions_to_orders.rb
My-Commerce_core-1.1.0 db/migrate/20101008190536_move_special_instructions_to_orders.rb
My-Commerce_core-1.0.0 db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerceapi-1.0.0 api/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerceapi-1.0.0 dash/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerceapi-1.0.0 promo/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerceapi-1.0.0 core/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerceapi-1.0.0 auth/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerceapi-1.0.0 core/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerceapi-1.0.0 sandbox/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerce-0.0.3 promo/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerce-0.0.3 core/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerce-0.0.3 auth/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerce-0.0.3 dash/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerce-0.0.3 core/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerce-0.0.3 api/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb
MyCommerce-0.0.3 sandbox/db/migrate/20101008190536_move_special_instructions_to_orders.rb
rfcommerce_sandbox-0.0.3 db/migrate/20101008190536_move_special_instructions_to_orders.rb