From a3b5fb6ecc26b51f59113b06a6a493af25a580e2 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 1 May 2021 21:06:47 +0200 Subject: [PATCH] =?UTF-8?q?Handle=20existing=20sql=20rows,=20properly?= =?UTF-8?q?=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/ldap.sql | 4 +--- conf/mail.sql | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/conf/ldap.sql b/conf/ldap.sql index 3b18d69..46531f1 100644 --- a/conf/ldap.sql +++ b/conf/ldap.sql @@ -13,6 +13,4 @@ INSERT INTO `settings` (`key`, `value`) VALUES ('tituspijean-auth-ldap.use_tls', ''), ('tituspijean-auth-ldap.user_mail', 'mail'), ('tituspijean-auth-ldap.user_username', 'uid') -AS new -ON DUPLICATE KEY UPDATE -value = new.value; +ON DUPLICATE KEY UPDATE value = VALUES(value); diff --git a/conf/mail.sql b/conf/mail.sql index f043bcb..82a7545 100644 --- a/conf/mail.sql +++ b/conf/mail.sql @@ -1,9 +1,7 @@ -REPLACE INTO `settings` (`key`, `value`) VALUES +INSERT INTO `settings` (`key`, `value`) VALUES ('mail_driver', 'mail'), ('mail_encryption', 'ssl'), ('mail_from', '$app@$domain'), ('mail_host', 'localhost'), ('mail_port', '587') - AS new -ON DUPLICATE KEY UPDATE -value = new.value; +ON DUPLICATE KEY UPDATE value = VALUES(value);