| 12345678910111213141516171819202122232425 |
- # encoding:utf-8
- class CreateAdminDeparts < ActiveRecord::Migration
- def up
- #管理员部门管理
- create_table :admin_departs do |t|
- #管理员ID
- t.column :admin_user_id, :integer,:null=>false, :default => 0
- #部门ID
- t.column :depart_record_id, :integer,:null=>false, :default => 0
- # 备注
- t.column :remark, :string,:limit => 256
- t.timestamps
- end
- add_index :admin_departs, :admin_user_id
- add_column :order_details, :depart, :integer
- end
- def down
- drop_table :admin_departs
- drop_table :order_details
- end
- end
|