--- id: 1c36a640-3d2d-4d85-8e65-a67aa6ea24de type: solution title: "Added default ordering to batstats GET list endpoint" tags: [paper-dynasty, postgres-migration, database-order] importance: 0.6 confidence: 0.8 created: "2026-02-01T01:31:41.148961+00:00" updated: "2026-02-01T01:31:41.148961+00:00" --- Added .order_by(BattingStat.id) to the BattingStat.select() query in /app/routers_v2/batstats.py at line 75. This ensures consistent row ordering for PostgreSQL migration. The ordering is applied after joins to Card and Player tables.