Add index to ahoy_messages to (#2367)
* Add index to ahoy_messages to * Add ahoy_messages index concurrently
This commit is contained in:
parent
653b74b39b
commit
b9f0b282ca
2 changed files with 8 additions and 0 deletions
|
|
@ -0,0 +1,7 @@
|
|||
class AddIndexToAhoyMessagesTo < ActiveRecord::Migration[5.2]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_index :ahoy_messages, :to, algorithm: :concurrently
|
||||
end
|
||||
end
|
||||
|
|
@ -33,6 +33,7 @@ ActiveRecord::Schema.define(version: 2019_07_23_094834) do
|
|||
t.string "utm_medium"
|
||||
t.string "utm_source"
|
||||
t.string "utm_term"
|
||||
t.index ["to"], name: "index_ahoy_messages_on_to"
|
||||
t.index ["token"], name: "index_ahoy_messages_on_token"
|
||||
t.index ["user_id", "user_type"], name: "index_ahoy_messages_on_user_id_and_user_type"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue