aboutsummaryrefslogtreecommitdiff
path: root/deploy
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2023-02-28 00:56:45 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2023-03-01 02:28:55 +0900
commit54e3c3f3e15a01b4ebf6ed43cc4b64cfba59ff36 (patch)
tree6e23655134080377a3ed2564e9317b2dc0d59abd /deploy
parentb7b17d87df7e70d6774e40b864227fc3ddce4686 (diff)
Add table for tracking transactions.
Diffstat (limited to 'deploy')
-rw-r--r--deploy/transactions.sql16
1 files changed, 16 insertions, 0 deletions
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;