add index to created_at for notifications (#5251) [deploy]
This commit is contained in:
parent
2415392da5
commit
1ac9a2d7bd
2 changed files with 9 additions and 1 deletions
|
|
@ -0,0 +1,7 @@
|
|||
class AddCreatedAtIndexToNotifications < ActiveRecord::Migration[5.2]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_index :notifications, :created_at, algorithm: :concurrently
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2019_12_23_202251) do
|
||||
ActiveRecord::Schema.define(version: 2019_12_26_202114) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
@ -569,6 +569,7 @@ ActiveRecord::Schema.define(version: 2019_12_23_202251) do
|
|||
t.boolean "read", default: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "user_id"
|
||||
t.index ["created_at"], name: "index_notifications_on_created_at"
|
||||
t.index ["json_data"], name: "index_notifications_on_json_data", using: :gin
|
||||
t.index ["notifiable_id"], name: "index_notifications_on_notifiable_id"
|
||||
t.index ["notifiable_type"], name: "index_notifications_on_notifiable_type"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue