提交 5f8abe47 编写于 作者: A Andreas Brandl

Flip column order in new index.

上级 c0bfe9db
......@@ -6,12 +6,12 @@ class AddIndexesForUserActivityQueries < ActiveRecord::Migration
disable_ddl_transaction!
def up
add_concurrent_index :events, [:project_id, :author_id]
add_concurrent_index :events, [:author_id, :project_id]
add_concurrent_index :user_interacted_projects, :user_id
end
def down
remove_concurrent_index :events, [:project_id, :author_id]
remove_concurrent_index :events, [:author_id, :project_id]
patch_foreign_keys do
remove_concurrent_index :user_interacted_projects, :user_id
......
......@@ -727,8 +727,8 @@ ActiveRecord::Schema.define(version: 20180320182229) do
end
add_index "events", ["action"], name: "index_events_on_action", using: :btree
add_index "events", ["author_id", "project_id"], name: "index_events_on_author_id_and_project_id", using: :btree
add_index "events", ["author_id"], name: "index_events_on_author_id", using: :btree
add_index "events", ["project_id", "author_id"], name: "index_events_on_project_id_and_author_id", using: :btree
add_index "events", ["project_id", "id"], name: "index_events_on_project_id_and_id", using: :btree
add_index "events", ["target_type", "target_id"], name: "index_events_on_target_type_and_target_id", using: :btree
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册