# encoding:utf-8
class CreateDepartRecords < ActiveRecord::Migration
  def up
    #部门管理
    create_table :depart_records do |t|
      #微信ID
      t.column :wx_user_id, :integer,:null=>false, :default => 0
      #部门名称
      t.column :name,:string
      #内部编号
      t.column :inner_no,:text
      #备注
      t.column :remark,:string
      t.timestamps
    end
    add_index :depart_records, :wx_user_id
  end

  def down
    drop_table :depart_records
  end

end
