Skip to content

Commit

Permalink
new indices for impressionist (#2462)
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren authored Mar 10, 2018
1 parent b11dd8c commit e277151
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 6 additions & 0 deletions db/migrate/20180309180053_impression_index.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class ImpressionIndex < ActiveRecord::Migration
def change
add_index "impressions", ["impressionable_type"], name: "index_impressions_on_impressionable_type"
add_index "impressions", ["impressionable_id"], name: "index_impressions_on_impressionable_id"
end
end
12 changes: 7 additions & 5 deletions db/schema.rb.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20180220180926) do
ActiveRecord::Schema.define(version: 20180309180053) do

create_table "answer_selections", force: true do |t|
t.integer "user_id"
Expand Down Expand Up @@ -42,7 +42,7 @@ ActiveRecord::Schema.define(version: 20180220180926) do
t.text "comment", limit: 2147483647, null: false
t.string "hostname", limit: 128, default: "", null: false
t.integer "timestamp", default: 0, null: false
t.integer "status", limit: 1, default: 1, null: false
t.integer "status", default: 1, null: false
t.integer "format", limit: 2, default: 0, null: false
t.string "thread"
t.string "name", limit: 60
Expand All @@ -51,7 +51,7 @@ ActiveRecord::Schema.define(version: 20180220180926) do
t.integer "aid", default: 0, null: false
end

add_index "comments", ["comment"], name: "index_comments_on_comment", type: :fulltext if ActiveRecord::Base.connection.adapter_name == 'Mysql2'
add_index "comments", ["comment"], name: "index_comments_on_comment", type: :fulltext
add_index "comments", ["nid"], name: "index_comments_nid", using: :btree
add_index "comments", ["pid"], name: "index_comments_pid", using: :btree
add_index "comments", ["status"], name: "index_comments_status", using: :btree
Expand Down Expand Up @@ -190,11 +190,13 @@ ActiveRecord::Schema.define(version: 20180220180926) do
add_index "impressions", ["controller_name", "action_name", "ip_address"], name: "controlleraction_ip_index", using: :btree
add_index "impressions", ["controller_name", "action_name", "request_hash"], name: "controlleraction_request_index", using: :btree
add_index "impressions", ["controller_name", "action_name", "session_hash"], name: "controlleraction_session_index", using: :btree
add_index "impressions", ["impressionable_id"], name: "index_impressions_on_impressionable_id", using: :btree
add_index "impressions", ["impressionable_type", "impressionable_id", "ip_address"], name: "poly_ip_index", using: :btree
add_index "impressions", ["impressionable_type", "impressionable_id", "params"], name: "poly_params_request_index", length: {"impressionable_type"=>nil, "impressionable_id"=>nil, "params"=>255}, using: :btree
add_index "impressions", ["impressionable_type", "impressionable_id", "request_hash"], name: "poly_request_index", using: :btree
add_index "impressions", ["impressionable_type", "impressionable_id", "session_hash"], name: "poly_session_index", using: :btree
add_index "impressions", ["impressionable_type", "message", "impressionable_id"], name: "impressionable_type_message_index", length: {"impressionable_type"=>nil, "message"=>255, "impressionable_id"=>nil}, using: :btree
add_index "impressions", ["impressionable_type"], name: "index_impressions_on_impressionable_type", using: :btree
add_index "impressions", ["user_id"], name: "index_impressions_on_user_id", using: :btree

create_table "node", primary_key: "nid", force: true do |t|
Expand Down Expand Up @@ -256,7 +258,7 @@ ActiveRecord::Schema.define(version: 20180220180926) do
t.integer "status", default: 1
end

add_index "node_revisions", ["body", "title"], name: "index_node_revisions_on_body_and_title", type: :fulltext if ActiveRecord::Base.connection.adapter_name == 'Mysql2'
add_index "node_revisions", ["body", "title"], name: "index_node_revisions_on_body_and_title", type: :fulltext
add_index "node_revisions", ["nid"], name: "index_node_revisions_nid", using: :btree
add_index "node_revisions", ["timestamp"], name: "index_node_revisions_timestamp", using: :btree
add_index "node_revisions", ["uid"], name: "index_node_revisions_uid", using: :btree
Expand Down Expand Up @@ -348,7 +350,7 @@ ActiveRecord::Schema.define(version: 20180220180926) do
add_index "rusers", ["email"], name: "index_rusers_on_email", using: :btree
add_index "rusers", ["persistence_token"], name: "index_rusers_on_persistence_token", using: :btree
add_index "rusers", ["status"], name: "index_rusers_on_status", using: :btree
add_index "rusers", ["username", "bio"], name: "index_rusers_on_username_and_bio", type: :fulltext if ActiveRecord::Base.connection.adapter_name == 'Mysql2'
add_index "rusers", ["username", "bio"], name: "index_rusers_on_username_and_bio", type: :fulltext
add_index "rusers", ["username"], name: "index_rusers_on_username", using: :btree

create_table "tag_selections", id: false, force: true do |t|
Expand Down

0 comments on commit e277151

Please sign in to comment.