aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-07-24 11:33:00 +0200
committerChristian Grothoff <grothoff@gnunet.org>2022-07-24 11:33:00 +0200
commit14d37a7165923baa050efda895c480a822ce48bf (patch)
tree7d3d917cf453ef39709cf6e185cf2404fc378396
parentec2c55569862a0efab868ee1a640c63a2fd92299 (diff)
-adapt to latest libgnunetpq
-rw-r--r--src/backenddb/Makefile.am4
-rw-r--r--src/backenddb/drop.sql (renamed from src/backenddb/drop0001.sql)0
-rw-r--r--src/backenddb/plugin_merchantdb_postgres.c7
-rw-r--r--src/backenddb/versioning.sql (renamed from src/backenddb/merchant-0000.sql)0
4 files changed, 7 insertions, 4 deletions
diff --git a/src/backenddb/Makefile.am b/src/backenddb/Makefile.am
index 8adc1d76..c26d47bb 100644
--- a/src/backenddb/Makefile.am
+++ b/src/backenddb/Makefile.am
@@ -11,11 +11,11 @@ pkgcfg_DATA = \
sqldir = $(prefix)/share/taler/sql/merchant/
sql_DATA = \
- merchant-0000.sql \
+ versioning.sql \
merchant-0001.sql \
merchant-0002.sql \
merchant-0003.sql \
- drop0001.sql
+ drop.sql
if HAVE_POSTGRESQL
if HAVE_GNUNETPQ
diff --git a/src/backenddb/drop0001.sql b/src/backenddb/drop.sql
index ceff6af5..ceff6af5 100644
--- a/src/backenddb/drop0001.sql
+++ b/src/backenddb/drop.sql
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c
index 830a3182..fd8fe441 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -116,16 +116,19 @@ postgres_drop_tables (void *cls)
{
struct PostgresClosure *pc = cls;
struct GNUNET_PQ_Context *conn;
+ enum GNUNET_GenericReturnValue ret;
conn = GNUNET_PQ_connect_with_cfg (pc->cfg,
"merchantdb-postgres",
- "drop",
+ NULL,
NULL,
NULL);
if (NULL == conn)
return GNUNET_SYSERR;
+ ret = GNUNET_PQ_exec_sql (conn,
+ "drop");
GNUNET_PQ_disconnect (conn);
- return GNUNET_OK;
+ return ret;
}
diff --git a/src/backenddb/merchant-0000.sql b/src/backenddb/versioning.sql
index 98e7f661..98e7f661 100644
--- a/src/backenddb/merchant-0000.sql
+++ b/src/backenddb/versioning.sql