diff --git a/db/migrate/20190410124957_add_index_to_ahoy_messages_to.rb b/db/migrate/20190410124957_add_index_to_ahoy_messages_to.rb new file mode 100644 index 000000000..0d147c598 --- /dev/null +++ b/db/migrate/20190410124957_add_index_to_ahoy_messages_to.rb @@ -0,0 +1,7 @@ +class AddIndexToAhoyMessagesTo < ActiveRecord::Migration[5.2] + disable_ddl_transaction! + + def change + add_index :ahoy_messages, :to, algorithm: :concurrently + end +end diff --git a/db/schema.rb b/db/schema.rb index 4516289fb..e13e04899 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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