-fix foreign key constraint issue

This commit is contained in:
Christian Grothoff 2022-11-27 22:00:24 +01:00
parent 68abe6d9fa
commit 1cdd999c96
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 32 additions and 39 deletions

View File

@ -42,7 +42,9 @@ TEH_PG_do_purse_deposit (
struct GNUNET_TIME_Timestamp reserve_expiration;
uint64_t partner_id = 0; /* FIXME #7271: WAD support... */
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint64 (&partner_id),
(0 == partner_id)
? GNUNET_PQ_query_param_null ()
: GNUNET_PQ_query_param_uint64 (&partner_id),
GNUNET_PQ_query_param_auto_from_type (purse_pub),
TALER_PQ_query_param_amount (amount),
GNUNET_PQ_query_param_auto_from_type (coin_pub),

View File

@ -63,8 +63,6 @@ TEH_PG_insert_purse_request (
};
*in_conflict = false;
PREPARE (pg,
"insert_purse_request",
"INSERT INTO purse_requests"
@ -79,7 +77,6 @@ TEH_PG_insert_purse_request (
" ,amount_with_fee_val"
" ,amount_with_fee_frac"
" ,purse_fee_val"
" ,purse_fee_frac"
" ,purse_sig"
" ) VALUES "
@ -127,8 +124,3 @@ TEH_PG_insert_purse_request (
return GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
}
}

View File

@ -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