Sha256: 31261c5f45e00bc8635a35e93dafe250fb14e7c8e093ac42429c8f66e2045bd8

Contents?: true

Size: 500 Bytes

Versions: 21

Compression:

Stored size: 500 Bytes

Contents

class AddFinalizedToSpreeAdjustments < ActiveRecord::Migration[4.2]
  # This migration replaces the open/closed state column of spree_adjustments
  # with a finalized boolean.
  # This may cause a few minutes of downtime on very large stores as the
  # adjustments table can become quite large.
  def change
    add_column :spree_adjustments, :finalized, :boolean
    execute "UPDATE spree_adjustments SET finalized=('closed' = state)"
    remove_column :spree_adjustments, :state, :string
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
solidus_core-2.3.1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.2.2 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.1.1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.0.3 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.3.0 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.3.0.rc3 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.3.0.rc2 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.3.0.rc1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.3.0.beta1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.0.2 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.2.1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.2.0 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.2.0.rc1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.2.0.beta1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.1.0 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.1.0.rc1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.0.1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.1.0.beta1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.0.0 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-2.0.0.rc1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb