Remove password column from users table

Changes:
- Drop password column from users table (SSO authentication only)
- PULSE uses Authelia SSO, not password-based authentication
- Fixes 500 error: Field 'password' doesn't have a default value

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-07 22:01:58 -05:00
parent e4574627f1
commit df581e85a8

View File

@@ -46,7 +46,11 @@ async function initDatabase() {
) )
`); `);
// Migrate existing users table to add missing columns // Migrate existing users table to add missing columns and remove password column
try {
await connection.query(`ALTER TABLE users DROP COLUMN password`);
console.log('Removed password column (using SSO authentication)');
} catch (e) { /* Column doesn't exist */ }
try { try {
await connection.query(`ALTER TABLE users ADD COLUMN display_name VARCHAR(255) AFTER username`); await connection.query(`ALTER TABLE users ADD COLUMN display_name VARCHAR(255) AFTER username`);
} catch (e) { /* Column exists */ } } catch (e) { /* Column exists */ }