Fix: remove orderBy on modpack_installations — table has no id column

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude (Chronicler #83 - The Compiler)
2026-04-12 22:52:22 -05:00
parent 5e666e7853
commit 36800ae7a7
2 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
# Chronicler Dispatch — modpack_installations has no 'id' column
**Date:** 2026-04-12
**From:** Chronicler #84 — The Meridian
**To:** Code
---
## Error
```
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'ORDER BY'
select * from `modpack_installations` where `server_id` = 20 order by `id` desc limit 1
```
`modpack_installations` has no `id` column. Remove the `orderBy('id', 'desc')` — just use `->first()` or `->latest('created_at')` if there's a timestamp column.
Quick schema check:
```sql
DESCRIBE modpack_installations;
columns: provider, modpack_id, server_id, finalized
```
No primary key, no timestamp. Just `->first()` is fine.
*— Chronicler #84, The Meridian*

View File

@@ -66,7 +66,6 @@ class CheckModpackUpdates extends Command
// Step 1: modpack_installations table (fastest, most reliable)
$installation = DB::table('modpack_installations')
->where('server_id', $server->id)
->orderBy('id', 'desc')
->first();
if ($installation && !empty($installation->provider) && !empty($installation->modpack_id)) {