diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2022-07-24 11:32:52 +0200 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2022-07-24 11:32:52 +0200 |
commit | 977ddd7bb97f9cec780407f27ccb2dbf8d1cf722 (patch) | |
tree | f2a192aedb47996805842c2dfed79e9fc3170e72 /src/auditordb | |
parent | 9eaee4c80353b4e1317c0df2418f24209c2b238d (diff) |
-adapt to latest libgnunetpq
Diffstat (limited to 'src/auditordb')
-rw-r--r-- | src/auditordb/Makefile.am | 6 | ||||
-rw-r--r-- | src/auditordb/drop.sql (renamed from src/auditordb/drop0001.sql) | 0 | ||||
-rw-r--r-- | src/auditordb/plugin_auditordb_postgres.c | 9 | ||||
-rw-r--r-- | src/auditordb/restart.sql (renamed from src/auditordb/restart0001.sql) | 0 | ||||
-rw-r--r-- | src/auditordb/versioning.sql (renamed from src/auditordb/auditor-0000.sql) | 0 |
5 files changed, 9 insertions, 6 deletions
diff --git a/src/auditordb/Makefile.am b/src/auditordb/Makefile.am index 92aabcd31..eef79256c 100644 --- a/src/auditordb/Makefile.am +++ b/src/auditordb/Makefile.am @@ -14,10 +14,10 @@ pkgcfg_DATA = \ sqldir = $(prefix)/share/taler/sql/auditor/ sql_DATA = \ - auditor-0000.sql \ + versioning.sql \ auditor-0001.sql \ - drop0001.sql \ - restart0001.sql + drop.sql \ + restart.sql EXTRA_DIST = \ auditordb-postgres.conf \ diff --git a/src/auditordb/drop0001.sql b/src/auditordb/drop.sql index 8e42c8094..8e42c8094 100644 --- a/src/auditordb/drop0001.sql +++ b/src/auditordb/drop.sql diff --git a/src/auditordb/plugin_auditordb_postgres.c b/src/auditordb/plugin_auditordb_postgres.c index 971893204..8b12474d3 100644 --- a/src/auditordb/plugin_auditordb_postgres.c +++ b/src/auditordb/plugin_auditordb_postgres.c @@ -97,20 +97,23 @@ struct PostgresClosure */ static enum GNUNET_GenericReturnValue postgres_drop_tables (void *cls, - int drop_exchangelist) + bool drop_exchangelist) { struct PostgresClosure *pc = cls; struct GNUNET_PQ_Context *conn; + enum GNUNET_GenericReturnValue ret; conn = GNUNET_PQ_connect_with_cfg (pc->cfg, "auditordb-postgres", - (drop_exchangelist) ? "drop" : "restart", + NULL, NULL, NULL); if (NULL == conn) return GNUNET_SYSERR; + ret = GNUNET_PQ_exec_sql (conn, + (drop_exchangelist) ? "drop" : "restart"); GNUNET_PQ_disconnect (conn); - return GNUNET_OK; + return ret; } diff --git a/src/auditordb/restart0001.sql b/src/auditordb/restart.sql index 90bb59551..90bb59551 100644 --- a/src/auditordb/restart0001.sql +++ b/src/auditordb/restart.sql diff --git a/src/auditordb/auditor-0000.sql b/src/auditordb/versioning.sql index 116f409b7..116f409b7 100644 --- a/src/auditordb/auditor-0000.sql +++ b/src/auditordb/versioning.sql |