Sha256: 7947e91e519a4bf1fd7421f45849faa43b9dc1e08a53667774f39c1bfb188a2c

Contents?: true

Size: 1.38 KB

Versions: 6

Compression:

Stored size: 1.38 KB

Contents

# This migration comes from spree (originally 20140713140455)
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
    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

6 entries across 6 versions & 1 rubygems

Version Path
spree_purchase_order-3.6.0 spec/dummy/db/migrate/20180516181993_create_spree_return_authorization_reasons.spree.rb
spree_purchase_order-3.5.0 spec/dummy/db/migrate/20180516181993_create_spree_return_authorization_reasons.spree.rb
spree_purchase_order-3.5.0.rc1 spec/dummy/db/migrate/20180516181993_create_spree_return_authorization_reasons.spree.rb
spree_purchase_order-3.4.0 spec/dummy/db/migrate/20180516181993_create_spree_return_authorization_reasons.spree.rb
spree_purchase_order-3.3.0 spec/dummy/db/migrate/20180516181993_create_spree_return_authorization_reasons.spree.rb
spree_purchase_order-3.2.0 spec/dummy/db/migrate/20180516181993_create_spree_return_authorization_reasons.spree.rb