From 54e3c3f3e15a01b4ebf6ed43cc4b64cfba59ff36 Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Tue, 28 Feb 2023 00:56:45 +0900 Subject: Add table for tracking transactions. --- deploy/transactions.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 deploy/transactions.sql (limited to 'deploy/transactions.sql') diff --git a/deploy/transactions.sql b/deploy/transactions.sql new file mode 100644 index 0000000..0a1d7eb --- /dev/null +++ b/deploy/transactions.sql @@ -0,0 +1,16 @@ +-- Deploy kakeibo:transactions to pg +-- requires: appschema +-- requires: transaction_type + +BEGIN; + +CREATE TABLE kakeibo.transactions ( + id SERIAL PRIMARY KEY, + type kakeibo.transaction_type NOT NULL, + date DATE NOT NULL, + note TEXT, + created_at TIMESTAMP NOT NULL DEFAULT NOW(), + updated_at TIMESTAMP NOT NULL DEFAULT NOW() +); + +COMMIT; -- cgit v1.2.3