From df581e85a847539a23b0b04af331ca30c35e4358 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Wed, 7 Jan 2026 22:01:58 -0500 Subject: [PATCH] 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 --- server.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index add165e..14d7f02 100644 --- a/server.js +++ b/server.js @@ -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 { await connection.query(`ALTER TABLE users ADD COLUMN display_name VARCHAR(255) AFTER username`); } catch (e) { /* Column exists */ }