Fixes users unable to login after upgrading from v1.0.0 to v1.1.0-dev.16.
The migration was using COALESCE(password_digest, password) which fails in
SQLite when password_digest column doesn't exist in v1.0.0 databases. The
v1.0.0 schema had a 'password' column, not 'password_digest'.
Changes:
- Dynamically detect which password column exists (password vs password_digest)
- Use the correct column in the migration SELECT statement
- Add enhanced trust proxy diagnostics to help debug configuration issues
Tested:
- Created v1.0.0 database with 'password' column
- Verified user login works pre-migration
- Ran migration with fix
- Confirmed password hash preserved and login still works post-migration