From a4d0653c44640dff53cd850f9c8f715c528ca0aa Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Mon, 9 Oct 2023 15:49:59 +0200 Subject: [PATCH] add IF NOT EXISTS to schema and extension creation --- system/dbupdate_3.4/28260_vertraege.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/dbupdate_3.4/28260_vertraege.php b/system/dbupdate_3.4/28260_vertraege.php index 3c2b2cb9d..90661f424 100644 --- a/system/dbupdate_3.4/28260_vertraege.php +++ b/system/dbupdate_3.4/28260_vertraege.php @@ -7,12 +7,12 @@ if ($result = $db->db_query("SELECT * FROM information_schema.tables WHERE table if ($db->db_num_rows($result) == 0) { $qry = " - CREATE SCHEMA hr; + CREATE SCHEMA IF NOT EXISTS hr; COMMENT ON SCHEMA hr IS E'Personalverwaltung'; ALTER SCHEMA hr OWNER TO fhcomplete; - CREATE EXTENSION pgcrypto; + CREATE EXTENSION IF NOT EXISTS pgcrypto; CREATE TABLE hr.tbl_dienstverhaeltnis (