|
|
class AddAnalyticsToPlayers < ActiveRecord::Migration[8.1]
|
|
|
def change
|
|
|
# Furthest screen the player reached, so drop-off can be measured for
|
|
|
# people who quit before ever answering anything (progress stays empty).
|
|
|
add_column :players, :furthest_step, :string
|
|
|
|
|
|
# Thumbs up (1) / thumbs down (-1) from the results screen. One per player.
|
|
|
add_column :players, :rating, :integer
|
|
|
add_column :players, :rated_at, :datetime
|
|
|
|
|
|
add_index :players, :furthest_step
|
|
|
add_index :players, :rating
|
|
|
add_index :players, :created_at
|
|
|
end
|
|
|
end
|