Skip to content

Commit

Permalink
Merge pull request #361 from bitex-la/add-event-log-index
Browse files Browse the repository at this point in the history
Add new index on event log table
  • Loading branch information
mdallago authored May 4, 2021
2 parents aebc1b0 + 0c96d87 commit f1a8242
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions db/migrate/20210504143326_add_event_log_index.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddEventLogIndex < ActiveRecord::Migration[5.2]
def change
add_index :event_logs, [:entity_type, :verb_id], :algorithm => :copy
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2021_04_22_142706) do
ActiveRecord::Schema.define(version: 2021_05_04_143326) do

create_table "active_admin_comments", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
t.string "namespace"
Expand Down Expand Up @@ -364,6 +364,7 @@
t.index ["admin_user_id"], name: "index_event_logs_on_admin_user_id"
t.index ["entity_id", "entity_type"], name: "index_event_logs_on_entity_id_and_entity_type"
t.index ["entity_id"], name: "index_event_logs_on_entity_id"
t.index ["entity_type", "verb_id"], name: "index_event_logs_on_entity_type_and_verb_id"
t.index ["entity_type"], name: "index_event_logs_on_entity_type"
t.index ["verb_id"], name: "index_event_logs_on_verb_id"
end
Expand Down

0 comments on commit f1a8242

Please sign in to comment.