A deploy/transactions.sql => deploy/transactions.sql +14 -0
@@ 0,0 1,14 @@
+-- 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,2) NOT NULL
+);
+
+CREATE INDEX ON transactions (customer_id, created_at DESC);
+
+COMMIT;
A revert/transactions.sql => revert/transactions.sql +7 -0
@@ 0,0 1,7 @@
+-- Revert jmp:transactions from pg
+
+BEGIN;
+
+DROP TABLE transactions;
+
+COMMIT;
M sqitch.plan => sqitch.plan +1 -0
@@ 1,3 1,4 @@
%syntax-version=1.0.0
%project=jmp
+transactions 2021-02-22T19:15:25Z Stephen Paul Weber <singpolyma@singpolyma.net> # Creates a table to track user's transactions
A verify/transactions.sql => verify/transactions.sql +13 -0
@@ 0,0 1,13 @@
+-- Verify jmp:transactions on pg
+
+BEGIN;
+
+SELECT
+ customer_id,
+ transaction_id,
+ created_at,
+ amount
+FROM transactions
+WHERE FALSE;
+
+ROLLBACK;