Added tools to resolve the 500 error when notes don't display due to
boolean type mismatches between SQLite (0/1) and PostgreSQL (TRUE/FALSE).
New files:
- scripts/fix-boolean-data.js: Converts INTEGER columns to BOOLEAN type
and migrates existing 0/1 data to FALSE/TRUE
- scripts/README-FIXES.md: Instructions for running the fix script
Improved:
- scripts/migrate-sqlite-to-postgres.js: Now automatically converts 0/1
to FALSE/TRUE for known boolean columns during migration
This resolves issues where:
- Migrated data contains INTEGER values (0/1) instead of BOOLEAN
- SQL queries using "completed = TRUE" fail to match rows
- API endpoints return 500 errors
To fix an existing database, run: node scripts/fix-boolean-data.js