Refactored src and dst account to just account in preparation for a "counter party", instead of a full account.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
CREATE TABLE transactions (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid (),
|
||||
description TEXT NOT NULL,
|
||||
account_id UUID NOT NULL CONSTRAINT fk_transactions_account REFERENCES accounts (id),
|
||||
amount_cents BIGINT NOT NULL CHECK (amount_cents >= 0),
|
||||
direction TEXT NOT NULL CHECK (direction IN ('in', 'out')),
|
||||
date TIMESTAMPTZ NOT NULL DEFAULT now()
|
||||
date TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
description TEXT NOT NULL
|
||||
);
|
||||
Reference in New Issue
Block a user