|
@@ -0,0 +1,23 @@
|
|
|
|
|
+# encoding:utf-8
|
|
|
|
|
+class CreateDeparts < ActiveRecord::Migration
|
|
|
|
|
+ def up
|
|
|
|
|
+ #部门管理
|
|
|
|
|
+ create_table :departs 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 :departs, :wx_user_id
|
|
|
|
|
+ end
|
|
|
|
|
+
|
|
|
|
|
+ def down
|
|
|
|
|
+ drop_table :departs
|
|
|
|
|
+ end
|
|
|
|
|
+
|
|
|
|
|
+end
|