Browse Source

Add index on mentions status_id

closed-social-v3
Eugen Rochko 7 years ago
parent
commit
cfe91ac984
2 changed files with 7 additions and 1 deletions
  1. +5
    -0
      db/migrate/20170405112956_add_index_on_mentions_status_id.rb
  2. +2
    -1
      db/schema.rb

+ 5
- 0
db/migrate/20170405112956_add_index_on_mentions_status_id.rb View File

@ -0,0 +1,5 @@
class AddIndexOnMentionsStatusId < ActiveRecord::Migration[5.0]
def change
add_index :mentions, :status_id
end
end

+ 2
- 1
db/schema.rb View File

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170403172249) do
ActiveRecord::Schema.define(version: 20170405112956) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@ -127,6 +127,7 @@ ActiveRecord::Schema.define(version: 20170403172249) do
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["account_id", "status_id"], name: "index_mentions_on_account_id_and_status_id", unique: true, using: :btree t.index ["account_id", "status_id"], name: "index_mentions_on_account_id_and_status_id", unique: true, using: :btree
t.index ["status_id"], name: "index_mentions_on_status_id", using: :btree
end end
create_table "mutes", force: :cascade do |t| create_table "mutes", force: :cascade do |t|

Loading…
Cancel
Save