Add index to speed up records by release date

This commit is contained in:
Claudio Ortolina
2026-03-13 16:23:29 +00:00
parent bba1b1eabc
commit a00b858226
@@ -0,0 +1,9 @@
defmodule MusicLibrary.Repo.Migrations.AddRecordsReleaseDateIndex do
use Ecto.Migration
def change do
# Supports ORDER BY release_date DESC (collection, wishlist, search results)
# and strftime filtering in Collection.get_records_on_this_day/1
create index(:records, [:release_date])
end
end