fix: Change library ordering to oldest-first
Change library ordering in dropdown from DESC to ASC to display libraries in creation order (oldest first). Database changes in internal/database/queries/queries.sql: - Modify GetUserLibraries query ORDER BY clause - Change from ORDER BY l.created_at DESC to ASC - Displays oldest libraries first in dropdown This provides a more intuitive ordering where users see their first-created libraries at the top of the list.
This commit is contained in:
@@ -5356,7 +5356,7 @@ FROM libraries l
|
||||
JOIN library_types lt ON l.library_type_id = lt.id
|
||||
LEFT JOIN library_visibility lv ON l.id = lv.library_id AND lv.user_id = $1
|
||||
WHERE COALESCE(lv.is_visible, true) = true
|
||||
ORDER BY l.created_at DESC
|
||||
ORDER BY l.created_at ASC
|
||||
`
|
||||
|
||||
type GetUserVisibleLibrariesRow struct {
|
||||
|
||||
@@ -124,7 +124,7 @@ FROM libraries l
|
||||
JOIN library_types lt ON l.library_type_id = lt.id
|
||||
LEFT JOIN library_visibility lv ON l.id = lv.library_id AND lv.user_id = $1
|
||||
WHERE COALESCE(lv.is_visible, true) = true
|
||||
ORDER BY l.created_at DESC;
|
||||
ORDER BY l.created_at ASC;
|
||||
|
||||
-- Media Items queries
|
||||
-- name: CreateMediaItem :one
|
||||
|
||||
Reference in New Issue
Block a user