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