Files
pocket-id/backend/resources/migrations/postgres/20250225182112_manual_smtp_tls_selection.up.sql

7 lines
281 B
MySQL
Raw Normal View History

UPDATE app_config_variables AS target
SET value = CASE
WHEN target.value = 'true' AND (SELECT value FROM app_config_variables WHERE key = 'smtpPort' LIMIT 1) = '587' THEN 'starttls'
WHEN target.value = 'true' THEN 'tls'
ELSE 'none'
END
WHERE target.key = 'smtpTls';