From c53491ee5ad694440c2feca36f11cda870fadfa1 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 25 Aug 2019 14:53:39 -0400 Subject: also create a utility table for counting --- bin/load | 2 ++ data/schema.sql | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/bin/load b/bin/load index b8e65e2..0df1d32 100755 --- a/bin/load +++ b/bin/load @@ -20,3 +20,5 @@ psql -U metabase ynab -c 'COPY transactions FROM STDIN' < transactions.tsv psql -U metabase ynab -c 'COPY subtransactions FROM STDIN' < subtransactions.tsv psql -U metabase ynab -c 'COPY scheduled_transactions FROM STDIN' < scheduled_transactions.tsv psql -U metabase ynab -c 'COPY scheduled_subtransactions FROM STDIN' < scheduled_subtransactions.tsv + +seq 1000000 | psql -U metabase ynab -c 'COPY ints FROM STDIN' diff --git a/data/schema.sql b/data/schema.sql index 9061489..59526ef 100644 --- a/data/schema.sql +++ b/data/schema.sql @@ -1,3 +1,4 @@ +DROP TABLE IF EXISTS ints; DROP TABLE IF EXISTS scheduled_subtransactions; DROP TABLE IF EXISTS scheduled_transactions; DROP TABLE IF EXISTS subtransactions; @@ -124,3 +125,7 @@ CREATE TABLE scheduled_subtransactions ( category_id text REFERENCES categories(id), transfer_account_id text REFERENCES accounts(id) ); + +CREATE TABLE ints ( + i integer PRIMARY KEY +); -- cgit v1.2.3-54-g00ecf