Stabilize order of records on this day
This commit is contained in:
@@ -47,7 +47,7 @@ defmodule MusicLibrary.Collection do
|
|||||||
from r in Record,
|
from r in Record,
|
||||||
where: not is_nil(r.purchased_at),
|
where: not is_nil(r.purchased_at),
|
||||||
where: fragment("strftime('%m-%d', ?) = ?", r.release_date, ^month_day),
|
where: fragment("strftime('%m-%d', ?) = ?", r.release_date, ^month_day),
|
||||||
order_by: [desc: r.release_date],
|
order_by: [{:desc, r.release_date}, order_alphabetically()],
|
||||||
select: ^Records.essential_fields()
|
select: ^Records.essential_fields()
|
||||||
|
|
||||||
Repo.all(q)
|
Repo.all(q)
|
||||||
|
|||||||
Reference in New Issue
Block a user