diff options
Diffstat (limited to 'data/investments-sheet-schema.sql')
-rw-r--r-- | data/investments-sheet-schema.sql | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/data/investments-sheet-schema.sql b/data/investments-sheet-schema.sql new file mode 100644 index 0000000..d538ec6 --- /dev/null +++ b/data/investments-sheet-schema.sql @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS holdings; +DROP TABLE IF EXISTS categories; + +CREATE TABLE investment_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) +); |