# frozen_string_literal: true

class ResizeApiKeyField < ActiveRecord::Migration[4.2]
  def change
    unless defined?(User)
      change_column :spree_users, :api_key, :string, limit: 48
    end
  end
end

# frozen_string_literal: true

class ResizeApiKeyField < ActiveRecord::Migration[4.2]
  def up
    unless defined?(User)
      change_column :spree_users, :api_key, :string, limit: 48
    end
  end
end

Fix migration `20120411123334` on rollback
Fix migration `20120411123334` on rollback

The migration was not reversible, so `change` was replaced by `up`.

Having a `down` method does not make much sense, as changing back the field
length to 40 characters does not bring any particular benefit.
