-- Deploy jmp:transactions to pg
BEGIN;
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,
note TEXT
);
CREATE INDEX ON transactions (customer_id, created_at DESC);
COMMIT;