Files
breedr/server/db
Jason Stedwell ce287f63d1 Fix schema drift: fresh installs were broken
- Create heat_cycles table in init.js (breeding.js used it but nothing created it)
- Add litters columns the routes actually use (breeding_date, whelping_date, puppy_count)
- Add health_records columns used by puppy logs (record_date, description)
- Puppy log insert now also sets NOT NULL test_date
- Migration 002 no-ops on a fresh DB instead of crashing on missing dogs table
- init.js honors DB_PATH and creates the data dir, so migrations and the app
  always target the same file

Verified: full heat-cycle/litter/puppy-log CRUD passes against a virgin database.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:45:22 -05:00
..