20170215302539_create_push_after_sub.rb 659 B

123456789101112131415161718192021222324252627
  1. # encoding:utf-8
  2. # 用户扫描我们生成的二维码后,推送什么内容
  3. class CreatePushAfterSub < ActiveRecord::Migration
  4. def self.up
  5. create_table :push_after_subs do |t|
  6. #推送类型,image图片,text文字,article图文
  7. t.column :push_type, :string, :null => false
  8. #标题
  9. t.column :push_title, :string
  10. #图片
  11. t.column :cover, :string
  12. #文案
  13. t.column :word, :text
  14. #点击链接
  15. t.column :url, :string
  16. #备注
  17. t.column :remark, :string, :null => false
  18. t.timestamps
  19. end
  20. end
  21. def self.down
  22. drop_table :push_after_subs
  23. end
  24. end