add IF NOT EXISTS to schema and extension creation

This commit is contained in:
Harald Bamberger
2023-10-09 15:49:59 +02:00
parent 2a72d48dea
commit a4d0653c44
+2 -2
View File
@@ -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
(