gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant] branch master updated: add UNIQUE constrai


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: add UNIQUE constraint on BIGSERIAL columns as that is not automatic in Postgres
Date: Fri, 14 Jul 2017 19:28:11 +0200

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 4fbf3a1  add UNIQUE constraint on BIGSERIAL columns as that is not 
automatic in Postgres
4fbf3a1 is described below

commit 4fbf3a105e22c7cbb08abb91730c3e5ca703e9d9
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Jul 14 17:56:50 2017 +0200

    add UNIQUE constraint on BIGSERIAL columns as that is not automatic in 
Postgres
---
 src/backenddb/plugin_merchantdb_postgres.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backenddb/plugin_merchantdb_postgres.c 
b/src/backenddb/plugin_merchantdb_postgres.c
index 45ecab5..a31b76c 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -86,12 +86,12 @@ postgres_initialize (void *cls)
                             ",contract_terms BYTEA NOT NULL"
                             ",h_contract_terms BYTEA NOT NULL"
                             ",timestamp INT8 NOT NULL"
-                            ",row_id BIGSERIAL"
+                            ",row_id BIGSERIAL UNIQUE" 
                             ",PRIMARY KEY (order_id, merchant_pub)"
                            ",UNIQUE (h_contract_terms, merchant_pub)"
                             ");"),
     GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS merchant_refunds ("
-                            " rtransaction_id BIGSERIAL"
+                            " rtransaction_id BIGSERIAL UNIQUE"
                             ",merchant_pub BYTEA NOT NULL CHECK 
(LENGTH(merchant_pub)=32)"
                             ",h_contract_terms BYTEA NOT NULL"
                             ",coin_pub BYTEA NOT NULL CHECK 
(LENGTH(coin_pub)=32)"

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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