* Initial field test spec work * Clean up specs * Fix codeclimage * Cleanups * Update names * Rename and remove need to pass logged in status * Leadup to prod: two experiments * Move test logic to controller and add tests Co-authored-by: Josh Puetz <josh@grorichpuetz.com>
16 lines
560 B
Ruby
16 lines
560 B
Ruby
class CreateFieldTestMemberships < ActiveRecord::Migration[5.2]
|
|
def change
|
|
create_table :field_test_memberships do |t|
|
|
t.string :participant_type
|
|
t.string :participant_id
|
|
t.string :experiment
|
|
t.string :variant
|
|
t.timestamp :created_at
|
|
t.boolean :converted, default: false
|
|
end
|
|
|
|
add_index :field_test_memberships, [:participant_type, :participant_id, :experiment],
|
|
unique: true, name: "index_field_test_memberships_on_participant"
|
|
add_index :field_test_memberships, [:experiment, :created_at]
|
|
end
|
|
end
|