aboutsummaryrefslogtreecommitdiff
path: root/deploy
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2023-03-12 01:57:45 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2023-03-12 23:38:12 +0900
commit55618dcd6a40c0b85612a20994114a18987ff43d (patch)
tree60cd724f49d2b1536cd54ed28ca450b0347928f8 /deploy
parent754001bf63c6ad0b18329f601360d470870704b8 (diff)
Add table for tracking transactions.
Diffstat (limited to 'deploy')
-rw-r--r--deploy/transactions.sql15
1 files changed, 15 insertions, 0 deletions
diff --git a/deploy/transactions.sql b/deploy/transactions.sql
new file mode 100644
index 0000000..e37b276
--- /dev/null
+++ b/deploy/transactions.sql
@@ -0,0 +1,15 @@
+-- Deploy kakeibo:transactions to pg
+-- requires: schema
+
+BEGIN;
+
+CREATE TABLE kakeibo.transactions (
+ id SERIAL PRIMARY KEY,
+ type_code INTEGER,
+ date DATE NOT NULL,
+ note TEXT,
+ created_at TIMESTAMP NOT NULL DEFAULT NOW(),
+ updated_at TIMESTAMP NOT NULL DEFAULT NOW()
+);
+
+COMMIT;