Sha256: 8fd70e2b65ad965512a500239123e49839382a5bf15c741d6674fb81fe150752

Contents?: true

Size: 1.93 KB

Versions: 20

Compression:

Stored size: 1.93 KB

Contents

#Creates the database tables, plus indexes, you'll need to use Conductor.

class ConductorMigration < ActiveRecord::Migration
  def self.up
    create_table "conductor_daily_experiments", :force => true do |t|
      t.date    "activity_date"
      t.string  "group_name"
      t.string  "alternative"
      t.decimal "conversion_value", :precision => 8, :scale => 2
      t.integer "views"
      t.integer "conversions"
    end

    add_index "conductor_daily_experiments", ["activity_date"], :name => "index_conductor_daily_experiments_on_activity_date"
    add_index "conductor_daily_experiments", ["group_name"], :name => "index_conductor_daily_experiments_on_group_name"

    create_table "conductor_raw_experiments", :force => true do |t|
      t.string   "identity_id"
      t.string   "group_name"
      t.string   "alternative"
      t.decimal  "conversion_value", :precision => 8, :scale => 2
      t.datetime "created_at"
      t.datetime "updated_at"
      t.string   "goal"
    end

    create_table "conductor_weight_histories", :force => true do |t|
      t.string   "group_name"
      t.string   "alternative"
      t.decimal  "weight",        :precision => 8, :scale => 2
      t.datetime "computed_at"
      t.integer  "launch_window"
    end

    add_index "conductor_weight_histories", ["computed_at", "group_name"], :name => "conductor_wh_date_and_group_ndx"

    create_table "conductor_weighted_experiments", :force => true do |t|
      t.string   "group_name"
      t.string   "alternative"
      t.decimal  "weight",      :precision => 8, :scale => 2
      t.datetime "created_at"
      t.datetime "updated_at"
    end

    add_index "conductor_weighted_experiments", ["group_name"], :name => "index_conductor_weighted_experiments_on_group_name"
  end

  def self.down
    drop_table :conductor_raw_experiments
    drop_table :conductor_daily_experiments
    drop_table :conductor_weight_histories
    drop_table :conductor_weighted_experiments
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
conductor-0.8.3 generators/conductor/templates/migration.rb
conductor-0.8.1 generators/conductor/templates/migration.rb
conductor-0.7.2 generators/conductor/templates/migration.rb
conductor-0.7.1 generators/conductor/templates/migration.rb
conductor-0.7.0 generators/conductor/templates/migration.rb
conductor-0.6.5 generators/conductor/templates/migration.rb
conductor-0.6.4 generators/conductor/templates/migration.rb
conductor-0.6.3 generators/conductor/templates/migration.rb
conductor-0.5.15 generators/conductor_migration/templates/migration.rb
conductor-0.5.14 generators/conductor_migration/templates/migration.rb
conductor-0.5.13 generators/conductor_migration/templates/migration.rb
conductor-0.5.12 generators/conductor_migration/templates/migration.rb
conductor-0.5.11 generators/conductor_migration/templates/migration.rb
conductor-0.5.10 generators/conductor_migration/templates/migration.rb
conductor-0.5.0 generators/conductor_migration/templates/migration.rb
conductor-0.4.1 generators/conductor_migration/templates/migration.rb
conductor-0.3.0 generators/conductor_migration/templates/migration.rb
conductor-0.2.16 generators/conductor_migration/templates/migration.rb
conductor-0.2.15 generators/conductor_migration/templates/migration.rb
conductor-0.2.13 generators/cmig/templates/migration.rb