class AddAppdirectIntegrationToOrders < ActiveRecord::Migration
  def self.up
    remove_column :orders, :company_id
    remove_column :orders, :user_id
    remove_column :orders, :quantity

    change_table(:orders) do |t|
      t.string :company_uuid
      t.string :company_website
      t.string :company_country
      t.string :user_uuid
      t.string :user_open_id
      t.string :user_email
      t.string :user_first_name
      t.string :user_last_name
      t.string :user_language
      t.string :user_address_full_name
      t.string :user_address_company_name
      t.string :user_address_phone
      t.string :user_address_phone_extension
      t.string :user_address_fax
      t.string :user_address_fax_extension
      t.string :user_address_street1
      t.string :user_address_street2
      t.string :user_address_city
      t.string :user_address_state
      t.string :user_address_zip
      t.string :user_address_country
      t.string :user_address_pobox
      t.string :user_address_pozip
      t.string :pricing_duration
      t.decimal :quantity
      t.string :unit
      t.decimal :quantity2
      t.string :unit2
      t.decimal :quantity3
      t.string :unit3
      t.text :all_data
    end
  end
end
