Files
tern-server/migrations/0012_account_updated_at.sql
T
Mateusz PstruchaandClaude Opus 5.5 56e2c89999
CI / test (push) Failing after 3m23s
Allow editing an account
PUT /api/accounts/:id replaces an account's settings; the password is
kept unless a new one is given. Accounts now have an updated_at, and
the sync manager restarts a task whose account changed since it
started — the task holds its own copy of the settings. Its status is
reset to pending so the old error doesn't linger.

Mail already synced stays when it's still the same mailbox (new
password, renamed host); a genuinely different mailbox shows up as a
UIDVALIDITY change on connect and re-syncs, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:11:10 +02:00

5 lines
301 B
SQL

-- When an account's settings last changed. The sync manager compares it
-- with the version its running task started from, and restarts the task
-- after an edit (new password, host, …) — the task holds its own copy.
ALTER TABLE accounts ADD COLUMN updated_at TIMESTAMPTZ NOT NULL DEFAULT now();