aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_merchantdb_plugin.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-01-02 20:40:11 +0100
committerChristian Grothoff <christian@grothoff.org>2021-01-02 20:40:11 +0100
commit7334cfc40995c98aa550fedc7b249d9c08100028 (patch)
tree27ee7cc6ed6fe18615fff32f67b3839de84c7805 /src/include/taler_merchantdb_plugin.h
parentfeb6c3c694f6f083d7b8d09a35f2074d5c3d44f4 (diff)
downloadmerchant-7334cfc40995c98aa550fedc7b249d9c08100028.tar.gz
merchant-7334cfc40995c98aa550fedc7b249d9c08100028.tar.bz2
merchant-7334cfc40995c98aa550fedc7b249d9c08100028.zip
fix DB initialization logic to avoid CREATE table attempts in taler-merchant-httpd
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r--src/include/taler_merchantdb_plugin.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index 67c1c5c1..2d64ce43 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -669,19 +669,15 @@ struct TALER_MERCHANTDB_Plugin
char *library_name;
/**
- * Connect to the database, possibly only to drop the tables. Called first
- * to complete the initialization.
+ * Connect to the database.
*
* @param cls closure
- * @param for_drop are we going to call drop_tables() next (and then
- * possibly again connect()?
*/
int
- (*connect) (void *cls,
- bool for_drop);
+ (*connect) (void *cls);
/**
- * Drop merchant tables. Used for testcases.
+ * Drop merchant tables. Used for testcases and to reset the DB.
*
* @param cls closure
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
@@ -690,6 +686,15 @@ struct TALER_MERCHANTDB_Plugin
(*drop_tables) (void *cls);
/**
+ * Initialize merchant tables
+ *
+ * @param cls closure
+ * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
+ */
+ int
+ (*create_tables) (void *cls);
+
+ /**
* Do a pre-flight check that we are not in an uncommitted transaction.
* If we are, try to commit the previous transaction and output a warning.
* Does not return anything, as we will continue regardless of the outcome.