diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-11-27 21:21:04 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-11-27 21:21:04 +0100 |
commit | cf2e37cd876651e799893e8fe5babb51a9e12dd7 (patch) | |
tree | 437047cc646fb1a3a86f4226fd5460bbe2b0c530 /src/exchangedb/0002-purse_deposits.sql | |
parent | f2ba02aab2b9bbd976107ecc4ac7e7d657a9d73a (diff) | |
download | exchange-cf2e37cd876651e799893e8fe5babb51a9e12dd7.tar.xz |
more work on SQL refactoring
Diffstat (limited to 'src/exchangedb/0002-purse_deposits.sql')
-rw-r--r-- | src/exchangedb/0002-purse_deposits.sql | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/exchangedb/0002-purse_deposits.sql b/src/exchangedb/0002-purse_deposits.sql index 25ccf1aa5..9452f4344 100644 --- a/src/exchangedb/0002-purse_deposits.sql +++ b/src/exchangedb/0002-purse_deposits.sql @@ -112,8 +112,10 @@ BEGIN EXECUTE FORMAT ( 'ALTER TABLE ' || table_name || ' ADD CONSTRAINT ' || table_name || '_foreign_partner' + ' FOREIGN KEY (partner_serial_id) ' ' REFERENCES partners(partner_serial_id) ON DELETE CASCADE' ',ADD CONSTRAINT ' || table_name || '_foreign_coin_pub' + ' FOREIGN KEY (coin_pub) ' ' REFERENCES known_coins (coin_pub) ON DELETE CASCADE' ); END @@ -127,17 +129,17 @@ INSERT INTO exchange_tables ,partitioned ,by_range) VALUES - ('purse-deposits' + ('purse_deposits' ,'exchange-0002' ,'create' ,TRUE ,FALSE), - ('purse-deposits' + ('purse_deposits' ,'exchange-0002' ,'constrain' ,TRUE ,FALSE), - ('purse-deposits' + ('purse_deposits' ,'exchange-0002' ,'foreign' ,TRUE |