# This migration and CreateVersionAssociations provide the necessary
# schema for tracking associations.
class AddDeparts < ActiveRecord::Migration
  def up
    add_column :wx_users, :depart, :integer
    add_column :balance_orders, :depart, :integer
    add_column :orders, :depart, :integer
    add_column :shop_applications, :depart, :integer

    add_index :wx_users, :depart
    add_index :balance_orders, :depart
    add_index :orders, :depart
    add_index :shop_applications, :depart

  end

  def down
    remove_column :wx_users, :depart
    remove_column :balance_orders, :depart, :integer
    remove_column :orders, :depart, :integer
    remove_column :shop_applications, :depart, :integer
  end
end
