From 1cdd999c960a9625e6c71e09c68f86c37f2996e5 Mon Sep 17 00:00:00 2001
From: Christian Grothoff <christian@grothoff.org>
Date: Sun, 27 Nov 2022 22:00:24 +0100
Subject: -fix foreign key constraint issue

---
 src/exchangedb/procedures.sql | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/exchangedb/procedures.sql')

diff --git a/src/exchangedb/procedures.sql b/src/exchangedb/procedures.sql
index 4bd24dde..f0df6444 100644
--- a/src/exchangedb/procedures.sql
+++ b/src/exchangedb/procedures.sql
@@ -1654,7 +1654,7 @@ BEGIN
 
 IF in_partner_url IS NULL
 THEN
-  my_partner_serial_id=0;
+  my_partner_serial_id=NULL;
 ELSE
   SELECT
     partner_serial_id
@@ -1817,7 +1817,6 @@ ELSE
 
 END IF;
 
-
 RETURN;
 
 END $$;
@@ -1851,7 +1850,7 @@ INSERT INTO exchange.purse_merges
     ,merge_sig
     ,merge_timestamp)
   VALUES
-    (0
+    (NULL
     ,in_reserve_pub
     ,in_purse_pub
     ,in_merge_sig
-- 
cgit v1.2.3

