20201222114999_create_depart_records.rb 492 B

123456789101112131415161718192021222324
  1. # encoding:utf-8
  2. class CreateDepartRecords < ActiveRecord::Migration
  3. def up
  4. #部门管理
  5. create_table :depart_records do |t|
  6. #微信ID
  7. t.column :wx_user_id, :integer,:null=>false, :default => 0
  8. #部门名称
  9. t.column :name,:string
  10. #内部编号
  11. t.column :inner_no,:text
  12. #备注
  13. t.column :remark,:string
  14. t.timestamps
  15. end
  16. add_index :depart_records, :wx_user_id
  17. end
  18. def down
  19. drop_table :depart_records
  20. end
  21. end