Sha256: 0d1c03a7c09e48d2a0fbdacabd18e967a0ad607d3db2a5dab5f94990afea73a1
Contents?: true
Size: 646 Bytes
Versions: 10
Compression:
Stored size: 646 Bytes
Contents
# This migration comes from spree (originally 20130807024302) class RenameAdjustmentFields < ActiveRecord::Migration def up remove_column :spree_adjustments, :originator_id remove_column :spree_adjustments, :originator_type add_column :spree_adjustments, :order_id, :integer unless column_exists?(:spree_adjustments, :order_id) # This enables the Spree::Order#all_adjustments association to work correctly Spree::Adjustment.reset_column_information Spree::Adjustment.where(adjustable_type: "Spree::Order").find_each do |adjustment| adjustment.update_column(:order_id, adjustment.adjustable_id) end end end
Version data entries
10 entries across 10 versions & 5 rubygems