From 08e193ea3cbca918e4cd0bea3eb9909a67d5216e Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 11:51:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BE=AE=E4=BF=A1=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user_wechat.rb | 3 +++ .../20160119034447_create_user_wechats.rb | 21 +++++++++++++++++++ db/schema.rb | 21 ++++++++++++++++++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 app/models/user_wechat.rb create mode 100644 db/migrate/20160119034447_create_user_wechats.rb diff --git a/app/models/user_wechat.rb b/app/models/user_wechat.rb new file mode 100644 index 000000000..f77e3273d --- /dev/null +++ b/app/models/user_wechat.rb @@ -0,0 +1,3 @@ +class UserWechat < ActiveRecord::Base + # attr_accessible :title, :body +end diff --git a/db/migrate/20160119034447_create_user_wechats.rb b/db/migrate/20160119034447_create_user_wechats.rb new file mode 100644 index 000000000..e2170f0c1 --- /dev/null +++ b/db/migrate/20160119034447_create_user_wechats.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 6de03ed54..a7b2af8b2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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