diff --git a/migrations/20260729120000_[2.0.3]_fix_smtp_auth_backfill.down.sql b/migrations/20260729120000_[2.0.3]_fix_smtp_auth_backfill.down.sql new file mode 100644 index 0000000000..bbd9fe599b --- /dev/null +++ b/migrations/20260729120000_[2.0.3]_fix_smtp_auth_backfill.down.sql @@ -0,0 +1,3 @@ +-- No-op: this migration repairs data and cannot be safely reversed. Rows that +-- were originally unauthenticated are indistinguishable from repaired ones, so +-- there is nothing to restore. diff --git a/migrations/20260729120000_[2.0.3]_fix_smtp_auth_backfill.up.sql b/migrations/20260729120000_[2.0.3]_fix_smtp_auth_backfill.up.sql new file mode 100644 index 0000000000..d6339128d3 --- /dev/null +++ b/migrations/20260729120000_[2.0.3]_fix_smtp_auth_backfill.up.sql @@ -0,0 +1,11 @@ +-- Repair rows mis-classified by the [2.0.2] smtp_xoauth2 back-fill. +-- That migration set smtp_authentication = 'login' whenever smtp_user and +-- smtp_password were merely NOT NULL, but empty-string credentials (valid and +-- common under 2.0.1, where SMTP authentication was optional) then fail the +-- stricter SmtpSettings::is_configured() check. That in turn makes settings +-- validation reject "gateway disconnect notifications" at startup and aborts +-- the core process. Fall back to 'none' for those rows, restoring 2.0.1 behavior. +UPDATE settings SET smtp_authentication = 'none' + WHERE smtp_authentication = 'login' + AND (smtp_user IS NULL OR smtp_user = '' + OR smtp_password IS NULL OR smtp_password = '');