Make tls_enabled
key migratin idempotent.
This commit is contained in:
parent
583dab4bc6
commit
d8ed40422e
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ func V2_1_0(db *sqlx.DB, fs stuffbin.FileSystem, ko *koanf.Koanf) error {
|
|||
SELECT JSONB_AGG(
|
||||
JSONB_SET(v - 'tls_enabled', '{tls_type}', (CASE WHEN v->>'tls_enabled' = 'true' THEN '"STARTTLS"' ELSE '"none"' END)::JSONB)
|
||||
) AS updated FROM settings, JSONB_ARRAY_ELEMENTS(value) v WHERE key = 'smtp'
|
||||
) s WHERE key = 'smtp';
|
||||
) s WHERE key = 'smtp' AND value::TEXT LIKE '%tls_enabled%';
|
||||
`); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue