~singpolyma/jmp-schemas

ref: 48bc71e185ca235f2192a2dbf6cb70dbd9de1aa1 jmp-schemas/deploy/transactions.sql -rw-r--r-- 343 bytes
48bc71e1Stephen Paul Weber sqitch tag 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- 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;