Sha256: 2f2a6ca23319406b03172a527e39ae4837c66b403c3a03970ced9ef37045e03f

Contents?: true

Size: 1.33 KB

Versions: 76

Compression:

Stored size: 1.33 KB

Contents

class CreateSpreeReturnAuthorizationReasons < ActiveRecord::Migration[4.2]
  def change
    create_table :spree_return_authorization_reasons do |t|
      t.string :name
      t.boolean :active, default: true
      t.boolean :mutable, default: true

      t.timestamps null: false, precision: 6
    end

    reversible do |direction|
      direction.up do
        Spree::ReturnAuthorizationReason.create!(name: 'Better price available')
        Spree::ReturnAuthorizationReason.create!(name: 'Missed estimated delivery date')
        Spree::ReturnAuthorizationReason.create!(name: 'Missing parts or accessories')
        Spree::ReturnAuthorizationReason.create!(name: 'Damaged/Defective')
        Spree::ReturnAuthorizationReason.create!(name: 'Different from what was ordered')
        Spree::ReturnAuthorizationReason.create!(name: 'Different from description')
        Spree::ReturnAuthorizationReason.create!(name: 'No longer needed/wanted')
        Spree::ReturnAuthorizationReason.create!(name: 'Accidental order')
        Spree::ReturnAuthorizationReason.create!(name: 'Unauthorized purchase')
      end
    end

    add_column :spree_return_authorizations, :return_authorization_reason_id, :integer
    add_index :spree_return_authorizations, :return_authorization_reason_id, name: 'index_return_authorizations_on_return_authorization_reason_id'
  end
end

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
spree_core-4.2.0.beta db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.9 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.8 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.7 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.6 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.5 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.4 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.3 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.2 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.1 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.0 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.0.rc3 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.0.rc2 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.1.0.rc1 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-3.7.10 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.0.3 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-3.7.9 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.0.2 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-3.7.8 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb
spree_core-4.0.1 db/migrate/20140713140455_create_spree_return_authorization_reasons.rb