Sha256: b9d93dfb220df8a8d97176abca75975b60a639913df1d2e343c80cf41b054261

Contents?: true

Size: 763 Bytes

Versions: 2

Compression:

Stored size: 763 Bytes

Contents

# This migration comes from spree (originally 20150824214129)
class ConvertHabtmToHmtForProductsPromotionRules < ActiveRecord::Migration
  def up
    add_column :spree_products_promotion_rules, :id, :primary_key
    add_column :spree_products_promotion_rules, :created_at, :datetime
    add_column :spree_products_promotion_rules, :updated_at, :datetime

    rename_table :spree_products_promotion_rules, :spree_product_promotion_rules
  end

  def down
    rename_table :spree_product_promotion_rules, :spree_products_promotion_rules

    remove_column :spree_products_promotion_rules, :id, :primary_key
    remove_column :spree_products_promotion_rules, :created_at, :datetime
    remove_column :spree_products_promotion_rules, :updated_at, :datetime
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_order_reporting-0.0.2 spec/dummy/db/migrate/20160707103617_convert_habtm_to_hmt_for_products_promotion_rules.spree.rb
spree_order_reporting-0.0.1 spec/dummy/db/migrate/20160706112569_convert_habtm_to_hmt_for_products_promotion_rules.spree.rb