aboutsummaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-08-23 01:06:02 -0400
committerJesse Luehrs <doy@tozt.net>2019-08-23 01:06:02 -0400
commitc01827c3e4105d990e7e3c7a0266df78b5c7db28 (patch)
tree66e36924d3cbde18aa8b85295848a8756ea4594e /data
parent51ff59228b2bbc3a92d9b3e867abb1144059034d (diff)
downloadynab-export-c01827c3e4105d990e7e3c7a0266df78b5c7db28.tar.gz
ynab-export-c01827c3e4105d990e7e3c7a0266df78b5c7db28.zip
also populate subtransactions
Diffstat (limited to 'data')
-rw-r--r--data/schema.sql11
1 files changed, 11 insertions, 0 deletions
diff --git a/data/schema.sql b/data/schema.sql
index fe690be..8a9fc3b 100644
--- a/data/schema.sql
+++ b/data/schema.sql
@@ -1,3 +1,4 @@
+DROP TABLE IF EXISTS subtransactions;
DROP TABLE IF EXISTS transactions;
DROP TABLE IF EXISTS payees;
DROP TABLE IF EXISTS categories;
@@ -54,3 +55,13 @@ CREATE TABLE transactions (
category_id text REFERENCES categories(id),
transfer_account_id text REFERENCES accounts(id)
);
+
+CREATE TABLE subtransactions (
+ id text PRIMARY KEY,
+ transaction_id text REFERENCES transactions(id) NOT NULL,
+ amount bigint NOT NULL,
+ memo text,
+ payee_id text REFERENCES payees(id),
+ category_id text REFERENCES categories(id),
+ transfer_account_id text REFERENCES accounts(id)
+);