~singpolyma/jmp-schemas

12f3a3329df2e17d501945115e3e8a37f98ea077 — Stephen Paul Weber 2 years ago b773f02
Add an optional note to transactions
2 files changed, 4 insertions(+), 2 deletions(-)

M deploy/transactions.sql
M verify/transactions.sql
M deploy/transactions.sql => deploy/transactions.sql +2 -1
@@ 6,7 6,8 @@ CREATE TABLE transactions (
	customer_id    TEXT          NOT NULL,
	transaction_id TEXT          PRIMARY KEY,
	created_at     timestamp     NOT NULL DEFAULT(NOW()),
	amount         NUMERIC(12,4) NOT NULL
	amount         NUMERIC(12,4) NOT NULL,
	note           TEXT
);

CREATE INDEX ON transactions (customer_id, created_at DESC);

M verify/transactions.sql => verify/transactions.sql +2 -1
@@ 6,7 6,8 @@ SELECT
	customer_id,
	transaction_id,
	created_at,
	amount
	amount,
	note
FROM transactions
WHERE FALSE;