添加微信用户表

This commit is contained in:
guange 2016-01-19 11:51:37 +08:00
parent 40047ff818
commit 08e193ea3c
3 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,3 @@
class UserWechat < ActiveRecord::Base
# attr_accessible :title, :body
end

View File

@ -0,0 +1,21 @@
class CreateUserWechats < ActiveRecord::Migration
def change
create_table :user_wechats do |t|
t.integer :subscribe
t.string :openid
t.string :nickname
t.integer :sex
t.string :language
t.string :city
t.string :province
t.string :country
t.string :headimgurl
t.string :subscribe_time
t.string :unionid
t.string :remark
t.integer :groupid
t.references :user
t.timestamps
end
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20160116034925) do
ActiveRecord::Schema.define(:version => 20160119034447) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -1853,6 +1853,25 @@ ActiveRecord::Schema.define(:version => 20160116034925) do
add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade"
add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count"
create_table "user_wechats", :force => true do |t|
t.integer "subscribe"
t.string "openid"
t.string "nickname"
t.integer "sex"
t.string "language"
t.string "city"
t.string "province"
t.string "country"
t.string "headimgurl"
t.string "subscribe_time"
t.string "unionid"
t.string "remark"
t.integer "groupid"
t.integer "user_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "users", :force => true do |t|
t.string "login", :default => "", :null => false
t.string "hashed_password", :limit => 40, :default => "", :null => false