Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Commit d000a0b

Browse files
alpaca-tcGargron
authored andcommitted
Add index to statuses_tags#status_id (mastodon#2394)
1 parent cf845fe commit d000a0b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddStatusIdIndexToStatusesTags < ActiveRecord::Migration[5.0]
2+
def change
3+
add_index :statuses_tags, :status_id
4+
end
5+
end

db/schema.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema.define(version: 20170418160728) do
13+
ActiveRecord::Schema.define(version: 20170424112722) do
1414

1515
# These are extensions that must be enabled in order to support this database
1616
enable_extension "plpgsql"
@@ -255,6 +255,7 @@
255255
create_table "statuses_tags", id: false, force: :cascade do |t|
256256
t.bigint "status_id", null: false
257257
t.integer "tag_id", null: false
258+
t.index ["status_id"], name: "index_statuses_tags_on_status_id", using: :btree
258259
t.index ["tag_id", "status_id"], name: "index_statuses_tags_on_tag_id_and_status_id", unique: true, using: :btree
259260
end
260261

0 commit comments

Comments
 (0)