Browse Source

Add index to statuses_tags#status_id (#2394)

closed-social-v3
alpaca-tc 7 years ago
committed by Eugen
parent
commit
d000a0b58a
2 changed files with 7 additions and 1 deletions
  1. +5
    -0
      db/migrate/20170424112722_add_status_id_index_to_statuses_tags.rb
  2. +2
    -1
      db/schema.rb

+ 5
- 0
db/migrate/20170424112722_add_status_id_index_to_statuses_tags.rb View File

@ -0,0 +1,5 @@
class AddStatusIdIndexToStatusesTags < ActiveRecord::Migration[5.0]
def change
add_index :statuses_tags, :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: 20170418160728) do
ActiveRecord::Schema.define(version: 20170424112722) 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"
@ -255,6 +255,7 @@ ActiveRecord::Schema.define(version: 20170418160728) do
create_table "statuses_tags", id: false, force: :cascade do |t| create_table "statuses_tags", id: false, force: :cascade do |t|
t.bigint "status_id", null: false t.bigint "status_id", null: false
t.integer "tag_id", null: false t.integer "tag_id", null: false
t.index ["status_id"], name: "index_statuses_tags_on_status_id", using: :btree
t.index ["tag_id", "status_id"], name: "index_statuses_tags_on_tag_id_and_status_id", unique: true, using: :btree t.index ["tag_id", "status_id"], name: "index_statuses_tags_on_tag_id_and_status_id", unique: true, using: :btree
end end

Loading…
Cancel
Save