Sha256: 3675d9b33c57b684facfcae1583fb6851899dad062e28b6b04fd8780f3cc2d06

Contents?: true

Size: 495 Bytes

Versions: 11

Compression:

Stored size: 495 Bytes

Contents

class AddFinalizedToSpreeAdjustments < ActiveRecord::Migration
  # 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

11 entries across 11 versions & 1 rubygems

Version Path
solidus_core-1.4.2 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-1.3.2 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-1.4.1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-1.4.0 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-1.4.0.rc1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-1.4.0.beta1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-1.3.1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-1.3.0 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-1.3.0.rc2 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-1.3.0.rc1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb
solidus_core-1.3.0.beta1 db/migrate/20150811211025_add_finalized_to_spree_adjustments.rb