class AddPosAttributeToSpreeOrder < ActiveRecord::Migration
  def change
    add_column :spree_orders, :pos, :boolean
  end
end

class AddPosAttributeToSpreeOrder < ActiveRecord::Migration
  def change
    # NOTE: This field already exists on some of our host projects.
    unless column_exists? :spree_orders, :pos
      add_column :spree_orders, :pos, :boolean
    end
  end
end

Check if the field already exists before creating it
Check if the field already exists before creating it

Since this fields already exists on our main host project, the migration
is unable to run and it halts the whole process.
