Add index to milestone_id on boards table

parent b67426c1
class AddIndexToMilestoneIdOnBoards < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index(:boards, :milestone_id)
end
def down
remove_index(:boards, :milestone_id)
end
end
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,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: 20170224075132) do ActiveRecord::Schema.define(version: 20170306180725) 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"
...@@ -188,6 +188,7 @@ ActiveRecord::Schema.define(version: 20170224075132) do ...@@ -188,6 +188,7 @@ ActiveRecord::Schema.define(version: 20170224075132) do
t.integer "milestone_id" t.integer "milestone_id"
end end
add_index "boards", ["milestone_id"], name: "index_boards_on_milestone_id", using: :btree
add_index "boards", ["project_id"], name: "index_boards_on_project_id", using: :btree add_index "boards", ["project_id"], name: "index_boards_on_project_id", using: :btree
create_table "broadcast_messages", force: :cascade do |t| create_table "broadcast_messages", force: :cascade do |t|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment