Sha256: 3d40fdccd000918668f8c638c523f512dfb4988a5cb759cf066734d6cef1dd95

Contents?: true

Size: 651 Bytes

Versions: 4

Compression:

Stored size: 651 Bytes

Contents

# This migration comes from spree_promo (originally 20110331094351)
class PromotionChangesToSubclassOfActivator < ActiveRecord::Migration
  def up
    drop_table :promotions
    rename_column :promotion_rules, :promotion_id, :activator_id
  end

  def down
    create_table :promotions, :force => true do |t|
      t.string   :name
      t.string   :code
      t.string   :description
      t.integer  :usage_limit
      t.boolean  :combine
      t.datetime :expires_at
      t.datetime :starts_at
      t.string   :match_policy, :default => 'all'

      t.timestamps
    end
    rename_column :promotion_rules, :activator_id, :promotion_id
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
datashift_spree-0.3.0 spec/sandbox/db/migrate/20121023154475_promotion_changes_to_subclass_of_activator.spree_promo.rb
datashift_spree-0.2.1 spec/sandbox/db/migrate/20121015151268_promotion_changes_to_subclass_of_activator.spree_promo.rb
datashift_spree-0.2.0 spec/sandbox/db/migrate/20120925192836_promotion_changes_to_subclass_of_activator.spree_promo.rb
datashift_spree-0.1.0 spec/sandbox/db/migrate/20120918081567_promotion_changes_to_subclass_of_activator.spree_promo.rb