Sha256: 91a15f5cc7251b3216a0f66d610e4a6950ccb0b52f11ff2747d4591d69f15ba4

Contents?: true

Size: 580 Bytes

Versions: 4

Compression:

Stored size: 580 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
  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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
field_test-0.4.0 lib/generators/field_test/templates/memberships.rb.tt
field_test-0.3.2 lib/generators/field_test/templates/memberships.rb.tt
field_test-0.3.1 lib/generators/field_test/templates/memberships.rb.tt
field_test-0.3.0 lib/generators/field_test/templates/memberships.rb.tt