| 123456789101112131415161718192021222324252627282930313233343536373839 |
- # encoding:utf-8
- class CreateShopApplications < ActiveRecord::Migration
- def up
- #创建店长申请表
- create_table :shop_applications do |t|
- # 会员ID
- t.column :user_id, :integer, :limit => 8, :default => 0
- # 微信ID
- t.column :wx_user_id, :integer, :limit => 8, :default => 0
- # 昵称
- t.column :nickname, :string,:limit => 255
- # 姓名
- t.column :name, :string,:limit => 255
- # 手机号码
- t.column :mobile, :integer, :limit => 8, :default => 0
- # 总金额
- t.column :total, :integer, :limit => 11, :default => 0
- # 详细地址
- t.column :address, :string,:limit => 255
- # 备注
- t.column :remark, :string,:limit => 255
- # 图片
- t.column :image, :string,:limit => 255
- # 状态
- t.column :status, :boolean, :default=>1
- # 审核时间
- t.column :pass_time, :datetime
- t.timestamps
- end
- add_column :wx_users, :rank, :integer,:default => 0,:limit => 8
- end
- def down
- remove_column :wx_users, :rank
- drop_table :shop_applications
- end
- end
|