Sha256: f1aa79866fc0b32380fda61369eacda9d1eaabcddf11ea985e45b3d8eb7de99e

Contents?: true

Size: 774 Bytes

Versions: 4

Compression:

Stored size: 774 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration
  def change
    create_table :searchjoy_searches do |t|
      t.integer :user_id
      t.string :search_type
      t.string :query
      t.string :normalized_query
      t.integer :results_count
      t.timestamp :created_at
      t.integer :convertable_id
      t.string :convertable_type
      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_and_normalized_query_an" # autogenerated name is too long
    add_index :searchjoy_searches, [:convertable_id, :convertable_type]
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
searchjoy-0.1.0 lib/generators/searchjoy/templates/install.rb
searchjoy-0.0.10 lib/generators/searchjoy/templates/install.rb
searchjoy-0.0.9 lib/generators/searchjoy/templates/install.rb
searchjoy-0.0.8 lib/generators/searchjoy/templates/install.rb