class CreateDailyPlatformStatistics < ActiveRecord::Migration[5.2]
  def change
    create_table :daily_platform_statistics do |t|
      t.date :date
      t.index :date, unique: true
      t.bigint :pv, default: 0
      t.bigint :visitor, default: 0
      t.bigint :ip, default: 0
      t.float :weekly_keep_rate, default: 0
      t.float :source_through, default: 0
      t.float :source_link, default: 0
      t.float :source_search, default: 0
      t.float :source_custom, default: 0

      t.timestamps
    end
  end
end
