From cf2e37cd876651e799893e8fe5babb51a9e12dd7 Mon Sep 17 00:00:00 2001
From: Christian Grothoff <christian@grothoff.org>
Date: Sun, 27 Nov 2022 21:21:04 +0100
Subject: more work on SQL refactoring

---
 src/exchangedb/0002-recoup.sql | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src/exchangedb/0002-recoup.sql')

diff --git a/src/exchangedb/0002-recoup.sql b/src/exchangedb/0002-recoup.sql
index b8f4f4cc..36e36d9d 100644
--- a/src/exchangedb/0002-recoup.sql
+++ b/src/exchangedb/0002-recoup.sql
@@ -105,8 +105,10 @@ BEGIN
   EXECUTE FORMAT (
     'ALTER TABLE ' || table_name ||
     ' ADD CONSTRAINT ' || table_name || '_foreign_reserves_out'
+    ' FOREIGN KEY (reserve_out_serial_id) '
     ' REFERENCES reserves_out (reserve_out_serial_id) ON DELETE CASCADE'
     ',ADD CONSTRAINT ' || table_name || '_foreign_coin_pub'
+    ' FOREIGN KEY (coin_pub) '
     ' REFERENCES known_coins (coin_pub)'
   );
 END
-- 
cgit v1.2.3

