blob: 2c859ef11b25865f70446b5606871f2b76ec8e55 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)
);
|