Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions db/migrate/20260408130608_add_covering_index_to_enrichments.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class AddCoveringIndexToEnrichments < ActiveRecord::Migration[7.2]
disable_departure!

def change
add_index :enrichments,
[:updated_at, :id],
order: { updated_at: :desc, id: :desc },
name: "index_enrichments_on_updated_at_and_id"
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[7.2].define(version: 2026_03_23_093101) do
ActiveRecord::Schema[7.2].define(version: 2026_04_08_130608) do
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "name", limit: 191, null: false
t.string "record_type", null: false
Expand Down Expand Up @@ -254,6 +254,7 @@
t.string "source_id", null: false
t.index ["doi", "updated_at", "id"], name: "index_enrichments_on_doi_and_updated_at_and_id", order: { updated_at: :desc, id: :desc }
t.index ["filename"], name: "index_enrichments_on_filename"
t.index ["updated_at", "id"], name: "index_enrichments_on_updated_at_and_id", order: :desc
t.index ["uuid"], name: "index_enrichments_on_uuid", unique: true
end

Expand Down
Loading