Sha256: c1b20d164370dcea37c8ce977f7f46142b1524d457f51e2c3700d870bac4d43d

Contents?: true

Size: 1.36 KB

Versions: 3

Compression:

Stored size: 1.36 KB

Contents

# This migration comes from spree (originally 20140713140455)
class CreateSpreeReturnAuthorizationReasons < ActiveRecord::Migration
  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
    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

3 entries across 3 versions & 2 rubygems

Version Path
spree_order_reporting-0.0.3 spec/dummy/db/migrate/20160708163183_create_spree_return_authorization_reasons.spree.rb
sprangular-0.1.0 spec/dummy/db/migrate/20141203183765_create_spree_return_authorization_reasons.spree.rb
sprangular-0.0.1 spec/dummy/db/migrate/20141203183765_create_spree_return_authorization_reasons.spree.rb