fix(migration): resolve v1.0.0 password column migration causing login failures (#1059)
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
This commit is contained in:
parent
56af7b9985
commit
0499fa127c
2 changed files with 23 additions and 1 deletions
|
|
@ -26,6 +26,8 @@ if (config.trustProxy !== false) {
|
|||
console.log(`[Trust Proxy] Disabled (value: false)`);
|
||||
}
|
||||
|
||||
console.log(`[Trust Proxy] Express setting confirmed:`, app.get('trust proxy'));
|
||||
|
||||
// Session store
|
||||
const sessionStore = new SequelizeStore({
|
||||
db: sequelize,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue