gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 04/189: if not exists


From: gnunet
Subject: [taler-grid5k] 04/189: if not exists
Date: Thu, 28 Apr 2022 10:46:14 +0200

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit b5583953e6320feea8eb0f48713f78caf4f6620f
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Thu Feb 17 22:41:13 2022 +0100

    if not exists
---
 experiment/scripts/database.sh | 1 +
 sql/exchange-0002.sql          | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index e8bbdb0..c5b00bb 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -185,6 +185,7 @@ EOF
  
   echo "OVERRIDING EXCHANGE SQL INIT SCRIPT"
   cp ${G5K_HOME}/sql/exchange-0001.sql /usr/share/taler/sql/exchange/
+  chown -R taler-exchange-httpd:taler-exchange-httpd 
/usr/share/taler/sql/exchange/exchange-0001.sql
 
   sudo -u taler-exchange-httpd taler-exchange-dbinit -r || true
   sudo -u taler-exchange-httpd taler-exchange-dbinit -s || true
diff --git a/sql/exchange-0002.sql b/sql/exchange-0002.sql
index 5eff8b3..e2a8f5f 100644
--- a/sql/exchange-0002.sql
+++ b/sql/exchange-0002.sql
@@ -66,7 +66,7 @@ BEGIN
   RAISE NOTICE 'Creating partition %_%', source_table, num;
 
   EXECUTE FORMAT(
-    'CREATE TABLE %I '
+    'CREATE TABLE IF NOT EXTISTS %I '
       'PARTITION OF %I '
       'FOR VALUES WITH (MODULUS %s, REMAINDER %s)',
     source_table || '_' || suffix,
@@ -133,7 +133,7 @@ BEGIN
   RAISE NOTICE 'Creating %_% on shard_%', source_table, suffix, suffix;
 
   EXECUTE FORMAT(
-    'CREATE FOREIGN TABLE %I '
+    'CREATE FOREIGN TABLE IF NOT EXISTS %I '
       'PARTITION OF %I '
       'FOR VALUES WITH (MODULUS %s, REMAINDER %s) '
       'SERVER %I',     
@@ -227,7 +227,7 @@ BEGIN
   );
 
   EXECUTE FORMAT(
-    'CREATE USER MAPPING FOR admin SERVER %I '
+    'CREATE USER MAPPING IF NOT EXISTS FOR admin SERVER %I '
       'OPTIONS (user %L, password %L)',
     'shard_' || suffix,
     usr,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]