7.5 KiB
BREEDR v0.4.0 Release Notes
Release Date: March 9, 2026
Branch: docs/clean-schema-and-roadmap-update
Focus: Clean Database Schema & Documentation Overhaul
🆕 What's New
Clean Database Architecture
We've completely overhauled the database design for simplicity and correctness:
- ✅ NO MORE MIGRATIONS - Fresh init creates correct schema automatically
- ✅ Removed weight/height columns - Never implemented, now gone
- ✅ Added litter_id column - Proper linking of puppies to litters
- ✅ Parents table approach - NO sire/dam columns in dogs table
- ✅ Normalized relationships - Sire/dam stored in separate parents table
Why This Matters
The old schema had:
- Migration scripts trying to fix schema issues
sire_idanddam_idcolumns causing "no such column" errors- Complex migration logic that could fail
The new schema:
- ✅ Clean initialization - always correct
- ✅ Normalized design - proper relationships
- ✅ Simple maintenance - no migration tracking
- ✅ Better logging - see exactly what's happening
🛠️ Technical Changes
Database
Removed:
dogs.weightcolumn (never implemented)dogs.heightcolumn (never implemented)dogs.sire_idcolumn (moved to parents table)dogs.dam_idcolumn (moved to parents table)server/db/migrations.js(no more migrations)
Added:
dogs.litter_idcolumn with foreign key to littersparentstable for sire/dam relationships- Clean
server/db/init.jsas single source of truth
API Changes
server/routes/dogs.js:
- Fixed parent handling - properly uses parents table
- Added detailed logging for relationship creation
- Removed schema detection logic
- Cleaner error messages
server/index.js:
- Removed migrations import and execution
- Simplified startup - just calls initDatabase()
- Better console output with status indicators
Documentation
New Files:
DATABASE.md- Complete schema referenceCLEANUP_NOTES.md- Lists outdated files to removeRELEASE_NOTES_v0.4.0.md- This file
Updated Files:
README.md- Current features and setup instructionsROADMAP.md- Accurate progress tracking and version history
Outdated Files (Manual Deletion Required):
DATABASE_MIGRATIONS.mdDEPLOY_NOW.mdFEATURE_IMPLEMENTATION.mdFRONTEND_FIX_REQUIRED.mdIMPLEMENTATION_PLAN.mdSPRINT1_PEDIGREE_COMPLETE.mdmigrate-now.sh
See CLEANUP_NOTES.md for details.
🚀 Upgrade Instructions
For Fresh Installs
No action needed! The database will initialize correctly:
git clone https://git.alwisp.com/jason/breedr.git
cd breedr
git checkout docs/clean-schema-and-roadmap-update
docker-compose up -d
For Existing Installations
Important: This update requires starting with a fresh database.
-
Backup your data:
cp data/breedr.db data/breedr.db.backup -
Stop the application:
docker-compose down -
Delete old database:
rm data/breedr.db -
Pull latest code:
git pull origin docs/clean-schema-and-roadmap-update -
Rebuild and restart:
docker-compose up -d --build -
Verify database:
docker exec -it breedr sqlite3 /app/data/breedr.db ".schema dogs"You should see
litter_idbut NOsire_id,dam_id,weight, orheightcolumns.
Data Migration Notes
Parent Relationships:
- Cannot be automatically migrated due to schema change
- You'll need to re-enter sire/dam relationships for existing dogs
- Use the dog edit form or litter linking feature
All Other Data:
- Basic dog info (name, breed, sex, etc.) can be re-entered
- Photos will need to be re-uploaded
- Consider this a fresh start with a clean, correct schema
🐛 Bug Fixes
- ✅ Fixed: "no such column: sire" errors
- ✅ Fixed: "no such column: weight" errors
- ✅ Fixed: "no such column: height" errors
- ✅ Fixed: Parent relationships not saving properly
- ✅ Fixed: Schema detection failures on startup
- ✅ Fixed: Migration system complexity
📚 Documentation Updates
DATABASE.md
Comprehensive database documentation including:
- Schema design principles
- All table structures with SQL
- API usage examples
- Query examples for relationships
- Fresh install instructions
- Troubleshooting guide
README.md
Updated with:
- Current feature list
- Clean schema explanation
- Fresh install vs upgrade instructions
- Troubleshooting for common errors
- Links to documentation
ROADMAP.md
Updated with:
- Phase 1-3 marked complete
- v0.4.0 release notes
- Current sprint focus recommendations
- Version history
🧐 Developer Notes
New Development Workflow
For database changes:
- Edit
server/db/init.jsonly - Test with fresh database:
rm data/breedr.db && npm run dev - Update
DATABASE.mddocumentation - No migrations needed!
For API changes involving parents:
- Use
parentstable for sire/dam relationships - Check
server/routes/dogs.jsfor examples - Log relationship creation for debugging
Testing
Test these scenarios:
- Fresh install - database created correctly
- Add dog with sire/dam - parents table populated
- Add dog via litter - litter_id set, parents auto-linked
- View dog details - parents and offspring shown correctly
- Pedigree view - multi-generation tree displays
📊 What's Next
Recommended Next Features
-
Trial Pairing Simulator (4-6 hours)
- Uses existing COI calculator backend
- High value for breeding decisions
- Relatively quick to implement
-
Health Records System (6-8 hours)
- Important for breeding decisions
- Vaccination tracking
- Document management
-
Heat Cycle Management (6-8 hours)
- Natural extension of litter management
- Calendar functionality
- Breeding planning
See ROADMAP.md for full details.
ℹ️ Support
Documentation:
- DATABASE.md - Schema reference
- README.md - Project overview
- ROADMAP.md - Development plan
- CLEANUP_NOTES.md - File cleanup guide
Common Issues:
- "no such column" errors → Delete database and restart
- Parents not saving → Check server logs for relationship creation
- Schema looks wrong → Verify with
.schema dogscommand
Logs:
docker logs breedr
🎉 Credits
Clean schema design and implementation by the BREEDR development team.
Special thanks for thorough testing and validation of the new database architecture.
📝 Changelog Summary
Added
- Clean database initialization system
dogs.litter_idcolumnparentstable for relationships- DATABASE.md documentation
- Detailed logging for debugging
- CLEANUP_NOTES.md
- RELEASE_NOTES_v0.4.0.md
Changed
- Database init is now single source of truth
- Parent relationships use parents table
- README.md updated
- ROADMAP.md updated
- Simplified server startup
Removed
- Migration system (
server/db/migrations.js) dogs.weightcolumndogs.heightcolumndogs.sire_idcolumndogs.dam_idcolumn- Schema detection logic
- Outdated documentation (marked for deletion)
Fixed
- "no such column" errors
- Parent relationship saving
- Schema consistency issues
- Migration failures
Full Diff: Compare branches on Gitea
Next Release: v0.5.0 - Trial Pairing Simulator (planned)