diff --git a/db/migrate/20180309180053_impression_index.rb b/db/migrate/20180309180053_impression_index.rb new file mode 100644 index 0000000000..c96e672a70 --- /dev/null +++ b/db/migrate/20180309180053_impression_index.rb @@ -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 diff --git a/db/schema.rb.example b/db/schema.rb.example index 7fa21e8c19..2143128bc5 100644 --- a/db/schema.rb.example +++ b/db/schema.rb.example @@ -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" @@ -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 @@ -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 @@ -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| @@ -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 @@ -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|