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:
@@ -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 */ }
|
||||||
|
|||||||
Reference in New Issue
Block a user