20180630024052_create_sign_up_channel.rb 520 B

1234567891011121314151617181920
  1. # encoding:utf-8
  2. # 这里是小程序码管理,parent_id关联注册渠道
  3. class CreateSignUpChannel < ActiveRecord::Migration
  4. def up
  5. create_table :sign_up_channels do |t|
  6. t.column :parent_id, :integer, :default=>0
  7. t.string :channel_value
  8. t.string :channel_url
  9. t.string :url_image
  10. t.integer :scan_times, :null => false, :default => 0
  11. t.column :invite_id, :integer, :default=>0
  12. t.timestamps
  13. end
  14. end
  15. def down
  16. drop_table :sign_up_channels
  17. end
  18. end