20210204114641_create_admin_departs.rb 502 B

12345678910111213141516171819202122
  1. # encoding:utf-8
  2. class CreateAdminDeparts < ActiveRecord::Migration
  3. def up
  4. #管理员部门管理
  5. create_table :admin_departs do |t|
  6. #管理员ID
  7. t.column :admin_user_id, :integer,:null=>false, :default => 0
  8. #部门ID
  9. t.column :depart_record_id, :integer,:null=>false, :default => 0
  10. # 备注
  11. t.column :remark, :string,:limit => 256
  12. t.timestamps
  13. end
  14. add_index :admin_departs, :room_id
  15. end
  16. def down
  17. drop_table :admin_departs
  18. end
  19. end