gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant] branch master updated: remove bogus UNIQUE constraint (


From: gnunet
Subject: [taler-merchant] branch master updated: remove bogus UNIQUE constraint (#6758)
Date: Fri, 19 Feb 2021 00:20:59 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new a1265a05 remove bogus UNIQUE constraint (#6758)
a1265a05 is described below

commit a1265a059aa048a539d4cc0ea3e072ef5f98f0c1
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Feb 19 00:20:57 2021 +0100

    remove bogus UNIQUE constraint (#6758)
---
 src/backend/taler-merchant-httpd_private-post-instances.c | 2 ++
 src/backenddb/merchant-0001.sql                           | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-post-instances.c 
b/src/backend/taler-merchant-httpd_private-post-instances.c
index 79c78f38..c4d1d617 100644
--- a/src/backend/taler-merchant-httpd_private-post-instances.c
+++ b/src/backend/taler-merchant-httpd_private-post-instances.c
@@ -405,6 +405,7 @@ TMH_private_post_instances (const struct TMH_RequestHandler 
*rh,
                                     &mi->settings);
       if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
       {
+        GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
         TMH_db->rollback (TMH_db->cls);
         goto retry;
       }
@@ -435,6 +436,7 @@ TMH_private_post_instances (const struct TMH_RequestHandler 
*rh,
       }
       if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
       {
+        GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
         TMH_db->rollback (TMH_db->cls);
         goto retry;
       }
diff --git a/src/backenddb/merchant-0001.sql b/src/backenddb/merchant-0001.sql
index a39a2436..ba2129dc 100644
--- a/src/backenddb/merchant-0001.sql
+++ b/src/backenddb/merchant-0001.sql
@@ -94,7 +94,7 @@ COMMENT ON TABLE merchant_keys
 
 CREATE TABLE IF NOT EXISTS merchant_accounts
   (account_serial BIGSERIAL PRIMARY KEY
-  ,merchant_serial BIGINT NOT NULL UNIQUE
+  ,merchant_serial BIGINT NOT NULL
      REFERENCES merchant_instances (merchant_serial) ON DELETE CASCADE
   ,h_wire BYTEA NOT NULL CHECK (LENGTH(h_wire)=64)
   ,salt BYTEA NOT NULL CHECK (LENGTH(salt)=64)
@@ -242,7 +242,7 @@ CREATE TABLE IF NOT EXISTS merchant_contract_terms
   ,refund_deadline INT8 NOT NULL
   ,paid BOOLEAN DEFAULT FALSE NOT NULL
   ,wired BOOLEAN DEFAULT FALSE NOT NULL
-  ,fulfillment_url VARCHAR 
+  ,fulfillment_url VARCHAR
   ,session_id VARCHAR DEFAULT '' NOT NULL
   ,UNIQUE (merchant_serial, order_id)
   ,UNIQUE (merchant_serial, h_contract_terms)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]