Automatically fixes INTEGER->BOOLEAN type mismatches when Docker starts.
This resolves the 500 error on /api/notes without manual intervention.
Changes:
- scripts/fix-postgres-boolean-types.sql: Idempotent SQL script that
detects INTEGER columns that should be BOOLEAN and converts them
(0→FALSE, 1→TRUE) for all affected tables
- docker-entrypoint.sh: Executes the boolean correction script
automatically after migrations and before starting the server
The script corrects these columns:
• users.is_admin
• notes.archived
• note_todos.completed, note_todos.priority
• global_todos.completed, global_todos.priority
• rss_feeds.enabled
• calendar_events.all_day
The correction is idempotent and runs on every container restart,
ensuring data integrity even after database migrations.
Fixes: Notes not displaying due to boolean type mismatch