fix(scheduled_shows.sql): sort upcoming shows by air date ascending
This commit is contained in:
parent
970061ff9d
commit
ca57082f01
3 changed files with 9 additions and 4 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "9.2.7",
|
"version": "9.2.8",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "9.2.7",
|
"version": "9.2.8",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minisearch": "^7.1.2",
|
"minisearch": "^7.1.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "9.2.7",
|
"version": "9.2.8",
|
||||||
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
@ -196,7 +196,12 @@ SELECT json_build_object(
|
||||||
FROM episodes e
|
FROM episodes e
|
||||||
WHERE e.show = s.id
|
WHERE e.show = s.id
|
||||||
)
|
)
|
||||||
ORDER BY s.title ASC
|
ORDER BY (
|
||||||
|
SELECT MIN(se.air_date)
|
||||||
|
FROM scheduled_episodes se
|
||||||
|
WHERE se.show_id = s.id
|
||||||
|
AND se.status IN ('upcoming', 'aired')
|
||||||
|
) ASC NULLS LAST
|
||||||
) unstarted
|
) unstarted
|
||||||
)
|
)
|
||||||
) AS scheduled_shows
|
) AS scheduled_shows
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue