Enforce a unique constraint for crypto deposits

Yeah, but we don't need a foreign key on both id and amount if id is unique.

On December 22, 2014 10:41:05 AM PST, Kirk Zathey <notifications@github.com> wrote:
>> @@ -215,19 +215,22 @@ create table deposits (
>>      user_id bigint not null,
>>      currency varchar(4) not null,
>>      fee numeric(23,8) not null check(fee >= 0),
>> +    unique(amount, id), -- for foreign key constraint on
>deposits_crypto
>
>Yes, but in order to have a foreign key constraint on `(amount, id)`,
>you need to have `unique(amount, id)`. This ensures that the amount in
>`deposits_crypto` must be the same as the amount in `deposits`.
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/txbits/txbits/pull/57/files#r22182231

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.