Sha256: 8bc6341bdce3776cd3c2ced0bb51b30dca42fdec38a74f85d07b141da32b1d3d

Contents?: true

Size: 752 Bytes

Versions: 5

Compression:

Stored size: 752 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
  def change
    create_table :searchjoy_searches do |t|
      t.references :user
      t.string :search_type
      t.string :query
      t.string :normalized_query
      t.integer :results_count
      t.timestamp :created_at
      t.references :convertable, polymorphic: true, index: {name: "index_searchjoy_searches_on_convertable"}
      t.timestamp :converted_at
    end

    add_index :searchjoy_searches, [:created_at]
    add_index :searchjoy_searches, [:search_type, :created_at]
    add_index :searchjoy_searches, [:search_type, :normalized_query, :created_at], name: "index_searchjoy_searches_on_search_type_query" # autogenerated name is too long
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
searchjoy-0.5.0 lib/generators/searchjoy/templates/install.rb.tt
searchjoy-0.4.3 lib/generators/searchjoy/templates/install.rb.tt
searchjoy-0.4.2 lib/generators/searchjoy/templates/install.rb.tt
searchjoy-0.4.1 lib/generators/searchjoy/templates/install.rb.tt
searchjoy-0.4.0 lib/generators/searchjoy/templates/install.rb.tt