From 15c63e7d8aaa54244fbd13afe30158892b888583 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 1 May 2021 15:44:21 +0200 Subject: [PATCH] Handle existing sql rows --- conf/ldap.sql | 3 ++- conf/mail.sql | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/conf/ldap.sql b/conf/ldap.sql index f75523d..cd91649 100644 --- a/conf/ldap.sql +++ b/conf/ldap.sql @@ -12,4 +12,5 @@ INSERT INTO `settings` (`key`, `value`) VALUES ('tituspijean-auth-ldap.use_ssl', ''), ('tituspijean-auth-ldap.use_tls', ''), ('tituspijean-auth-ldap.user_mail', 'mail'), -('tituspijean-auth-ldap.user_username', 'uid'); +('tituspijean-auth-ldap.user_username', 'uid') + ON DUPLICATE KEY UPDATE value = VALUES(value); diff --git a/conf/mail.sql b/conf/mail.sql index 5cb435c..5025859 100644 --- a/conf/mail.sql +++ b/conf/mail.sql @@ -3,4 +3,5 @@ REPLACE INTO `settings` (`key`, `value`) VALUES ('mail_encryption', 'ssl'), ('mail_from', '$app@$domain'), ('mail_host', 'localhost'), - ('mail_port', '587'); + ('mail_port', '587') + ON DUPLICATE KEY UPDATE value = VALUES(value);