From b3524dc01faf490273b0c1e7214b5780dc2f9c26 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 21 Apr 2026 01:12:04 +0300 Subject: [PATCH] fix(migration): Correctly migrate password column from v1.0.0 (Issue #1051) (#1052) The migration was trying to copy from `password_digest`, but v1.0.0 databases have the column named `password`. This caused all passwords to become NULL during migration, preventing users from logging in. Fixed SELECT to read from `password` instead of `password_digest`. Fixes #1051 --- .../migrations/20260420000004-make-password-optional.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/migrations/20260420000004-make-password-optional.js b/backend/migrations/20260420000004-make-password-optional.js index f7bce00..5af41f1 100644 --- a/backend/migrations/20260420000004-make-password-optional.js +++ b/backend/migrations/20260420000004-make-password-optional.js @@ -59,11 +59,12 @@ module.exports = { next_task_suggestion_enabled, today_settings, sidebar_settings, ui_settings, notification_preferences, keyboard_shortcuts, email_verified, email_verification_token, - email_verification_token_expires_at, created_at, updated_at + email_verification_token_expires_at, created_at, updated_at, + ai_provider, openai_api_key, ollama_base_url, ollama_model ) SELECT id, uid, name, surname, email, - COALESCE(password_digest, NULL) as password_digest, + password as password_digest, appearance, language, timezone, first_day_of_week, avatar_image, telegram_bot_token, telegram_chat_id, task_summary_enabled, task_summary_frequency, @@ -73,7 +74,8 @@ module.exports = { next_task_suggestion_enabled, today_settings, sidebar_settings, ui_settings, notification_preferences, keyboard_shortcuts, email_verified, email_verification_token, - email_verification_token_expires_at, created_at, updated_at + email_verification_token_expires_at, created_at, updated_at, + ai_provider, openai_api_key, ollama_base_url, ollama_model FROM users; `);