diff options
author | priscilla <priscilla.huang@efrei.net> | 2022-11-16 08:10:13 -0500 |
---|---|---|
committer | priscilla <priscilla.huang@efrei.net> | 2022-11-16 08:10:13 -0500 |
commit | dd78f3d2c4c3862344cde18c633a92e798ab24dd (patch) | |
tree | ff0c3da4b455261967c538a784af14df02d3242b | |
parent | ec5700106a75b75310c365a92f23b4a1a55bba2c (diff) | |
download | merchant-dd78f3d2c4c3862344cde18c633a92e798ab24dd.tar.gz merchant-dd78f3d2c4c3862344cde18c633a92e798ab24dd.tar.bz2 merchant-dd78f3d2c4c3862344cde18c633a92e798ab24dd.zip |
template sql
-rw-r--r-- | src/backenddb/merchant-000.sql | 30 | ||||
-rw-r--r-- | src/backenddb/merchant-0004.sql | 48 |
2 files changed, 1 insertions, 77 deletions
diff --git a/src/backenddb/merchant-000.sql b/src/backenddb/merchant-000.sql deleted file mode 100644 index a3c8b484..00000000 --- a/src/backenddb/merchant-000.sql +++ /dev/null @@ -1,30 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2021 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --- - --- Everything in one big transaction -BEGIN; - --- Check patch versioning is in place. -SELECT _v.register_patch('merchant-0003', NULL, NULL); - -SET search_path TO merchant; - -ALTER TABLE merchant_exchange_wire_fees - DROP COLUMN wad_fee_val, - DROP COLUMN wad_fee_frac; - --- Complete transaction -COMMIT; diff --git a/src/backenddb/merchant-0004.sql b/src/backenddb/merchant-0004.sql index f18487cc..f77a693a 100644 --- a/src/backenddb/merchant-0004.sql +++ b/src/backenddb/merchant-0004.sql @@ -51,37 +51,6 @@ COMMENT ON COLUMN merchant_template.template_contract IS 'The template contract will contains some additional information.' -CREATE TABLE IF NOT EXISTS merchant_using_template - (using_template_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY - ,merchant_serial BIGINT NOT NULL - REFERENCES merchant_instances (merchant_serial) ON DELETE CASCADE - ,subject VARCHAR - ,amount_val INT8 VARCHAR - ,amount_frac INT4 VARCHAR - ,UNIQUE (merchant_serial, template_id) - ); -COMMENT ON TABLE merchant_using_template - IS 'Public template used by the customer (may be incomplete, frontend can override'; -COMMENT ON COLUMN merchant_using_template.subject - IS 'Customer can write the subject of the payment'; -COMMENT ON COLUMN merchant_using_template.amount_val - IS 'Current amount that needs to be enter by the customeer'; - - -CREATE TABLE IF NOT EXISTS merchant_using_template_response - (using_template_response_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY - ,merchant_serial BIGINT NOT NULL - REFERENCES merchant_instances (merchant_serial) ON DELETE CASCADE - ,taler_url VARCHAR NOT NULL - ,UNIQUE (merchant_serial, template_id) - ); -COMMENT ON TABLE merchant_using_template_response - IS 'This table is used when the customer needs to finish his payment'; -COMMENT ON COLUMN merchant_using_template.taler_url - IS 'Returns an url when the user go through a browser'; - - - -- C CODE @@ -136,7 +105,7 @@ postgres_insert_template (void *cls, GNUNET_PQ_query_param_string (template_id), GNUNET_PQ_query_param_string (pd->template_description), GNUNET_PQ_query_param_string (pd->image), - GNUNET_PQ_query_param param2[], + GNUNET_PQ_query_param [], GNUNET_PQ_query_param_end }; @@ -148,21 +117,6 @@ postgres_insert_template (void *cls, } -{ - struct PostgresClosure *pg = cls2; - struct GNUNET_PQ_QueryParam param2[] = { - TALER_PQ_query_param_amount (&pd->amount), - GNUNET_PQ_query_param_string (pd->summary), - GNUNET_PQ_query_param_relativetime (&pd->pay_duration), - GNUNET_PQ_query_param_uint32 (&pd->minimum_age), - - }; - - check_connection (pg); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "insert_template", - params); -} /** * Update details about a particular template. Note that the |