diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-08-25 04:14:04 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-08-25 04:14:04 -0400 |
commit | e675daa3405946729357befbf60e4f1a725c0587 (patch) | |
tree | 90a47644cc8985bd749232032c0484143939c999 /data | |
parent | 82203823d3f6c66b07ad00abc9f4d5abec7080a3 (diff) | |
download | metabase-utils-e675daa3405946729357befbf60e4f1a725c0587.tar.gz metabase-utils-e675daa3405946729357befbf60e4f1a725c0587.zip |
first pass at an implementation
Diffstat (limited to 'data')
-rw-r--r-- | data/schema.sql | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/data/schema.sql b/data/schema.sql new file mode 100644 index 0000000..2c859ef --- /dev/null +++ b/data/schema.sql @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS holdings; +DROP TABLE IF EXISTS categories; + +CREATE TABLE categories ( + name text PRIMARY KEY, + target_allocation integer +); + +CREATE TABLE holdings ( + account text, + symbol text, + name text, + category text REFERENCES categories(name), + shares numeric(10, 3), + price numeric(10, 2), + expense_ratio numeric(5, 2), + PRIMARY KEY (account, symbol, category) +); |