# encoding:utf-8 # 用户发送关键字,推送什么内容 class CreateKeyWordPushs < ActiveRecord::Migration def self.up create_table :key_word_pushs do |t| #关键字 t.column :key_word, :string #推送类型,image图片,text文字,article图文 t.column :push_type, :string, :null => false #标题 t.column :push_title, :string #图片 t.column :cover, :string #文案 t.column :word, :string #点击链接 t.column :url, :string #备注 t.column :remark, :string, :null => false #公众号ID t.column :wx_gongzhonghao_id, :integer t.timestamps end add_index :key_word_pushs, :key_word end def self.down drop_table :key_word_pushs end end