Sha256: 8f88e928b32d7070a5fd96bf386254810e0f2734e22405c938ebb5dc207e13a2

Contents?: true

Size: 835 Bytes

Versions: 7

Compression:

Stored size: 835 Bytes

Contents

# This migration comes from spree (originally 20100819170125)
class RefactorAdjustments < ActiveRecord::Migration
  def up
    change_table :adjustments do |t|
      t.boolean :mandatory
      t.boolean :frozen
      t.rename :adjustment_source_id, :source_id
      t.rename :adjustment_source_type, :source_type
      t.references :originator
      t.string :originator_type
      t.remove :type
      t.rename :description, :label
      t.remove :position
    end
  end

  def down
    change_table :adjustments do |t|
      t.integer :position
      t.rename :label, :description
      t.string :type
      t.remove :originator_type
      t.remove :originator_id
      t.rename :source_type, :adjustment_source_type
      t.rename :source_id, :adjustment_source_id
      t.remove :frozen
      t.remove :mandatory
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
spree_mercado_pago_payment_method-0.0.2 spec/dummy/db/migrate/20121121030194_refactor_adjustments.spree.rb
spree_mercado_pago_payment_method-0.1.1 spec/dummy/db/migrate/20121121030194_refactor_adjustments.spree.rb
spree_mercado_pago_payment_method-0.1.0 spec/dummy/db/migrate/20121121030194_refactor_adjustments.spree.rb
datashift_spree-0.3.0 spec/sandbox/db/migrate/20121023154413_refactor_adjustments.spree.rb
datashift_spree-0.2.1 spec/sandbox/db/migrate/20121015151206_refactor_adjustments.spree.rb
datashift_spree-0.2.0 spec/sandbox/db/migrate/20120925192774_refactor_adjustments.spree.rb
datashift_spree-0.1.0 spec/sandbox/db/migrate/20120918081505_refactor_adjustments.spree.rb