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
This commit is contained in:
parent
b9eaedc468
commit
b3524dc01f
1 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
`);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue