Sha256: b254b17bf6425b5707912378fce7497f1cd5def84d244ba2c31da9bbd38a55a2
Contents?: true
Size: 481 Bytes
Versions: 14
Compression:
Stored size: 481 Bytes
Contents
class AddOrderStore < ActiveRecord::Migration def self.up if table_exists?('orders') add_column :orders, :store_id, :integer elsif table_exists?('spree_orders') add_column :spree_orders, :store_id, :integer unless column_exists?(:spree_orders, :store_id) end end def self.down if table_exists?('orders') remove_column :orders, :store_id elsif table_exists?('spree_orders') remove_column :spree_orders, :store_id end end end
Version data entries
14 entries across 14 versions & 1 rubygems