merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit cadd4ae3c9e59dbe153622cb9a142795f318e651
parent 4a36d2e36b0b8e5d77e2943df3f3bc730be009ca
Author: priscilla <priscilla.huang@efrei.net>
Date:   Fri, 18 Nov 2022 10:42:25 -0500

update

Diffstat:
Msrc/backenddb/Makefile.am | 1+
Msrc/backenddb/drop.sql | 1+
Msrc/backenddb/merchant-0004.sql | 9++++-----
Msrc/backenddb/plugin_merchantdb_postgres.c | 5+----
Msrc/backenddb/test_merchantdb.c | 1+
5 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/backenddb/Makefile.am b/src/backenddb/Makefile.am @@ -15,6 +15,7 @@ sql_DATA = \ merchant-0001.sql \ merchant-0002.sql \ merchant-0003.sql \ + merchant-0004.sql \ drop.sql if HAVE_POSTGRESQL diff --git a/src/backenddb/drop.sql b/src/backenddb/drop.sql @@ -24,6 +24,7 @@ BEGIN; -- latest requirements for dropping tables. -- Unregister patch (0003.sql) +SELECT _v.unregister_patch('merchant-0004'); SELECT _v.unregister_patch('merchant-0003'); SELECT _v.unregister_patch('merchant-0002'); SELECT _v.unregister_patch('merchant-0001'); diff --git a/src/backenddb/merchant-0004.sql b/src/backenddb/merchant-0004.sql @@ -14,16 +14,14 @@ -- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> -- -*/ + /** * @file merchant-004.sql * @brief database helper functions for postgres used by the merchant and funtion for plugin_merchantdb_postgres.c * @author Priscilla Huang */ --- Everything in one big transaction BEGIN; - -- Check patch versioning is in place. SELECT _v.register_patch('merchant-0004', NULL, NULL); @@ -41,12 +39,13 @@ CREATE TABLE IF NOT EXISTS merchant_template ,template_contract VARCHAR NOT NULL -- in JSON format ,UNIQUE (merchant_serial, template_id) ); -COMMENT ON TABLE merchant_template +COMMENT ON TABLE merchant_template IS 'template used by the merchant (may be incomplete, frontend can override)'; COMMENT ON COLUMN merchant_template.template_description IS 'Human-readable template description'; COMMENT ON COLUMN merchant_template.image IS 'NOT NULL, but can be 0 bytes; must contain an ImageDataUrl'; COMMENT ON COLUMN merchant_template.template_contract - IS 'The template contract will contains some additional information.' + IS 'The template contract will contains some additional information.'; +COMMIT; diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c @@ -6902,10 +6902,7 @@ postgres_update_template (void *cls, GNUNET_PQ_query_param_end }; - { - GNUNET_break (0); - return GNUNET_DB_STATUS_HARD_ERROR; - } + check_connection (pg); return GNUNET_PQ_eval_prepared_non_select (pg->conn, "update_template", diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c @@ -7367,6 +7367,7 @@ main (int argc, (void) GNUNET_asprintf (&config_filename, "%s.conf", testname); + fprintf(stdout, "Using %s\n", config_filename); cfg = GNUNET_CONFIGURATION_create (); if (GNUNET_OK != GNUNET_CONFIGURATION_parse (cfg,