db: add 001_schema_asset & 002_table_stock
This commit is contained in:
parent
8a04c9f4db
commit
88697b8d63
|
@ -1,5 +1,5 @@
|
|||
CREATE TABLE companies (
|
||||
id SERIAL PRIMARY KEY
|
||||
id BIGSERIAL PRIMARY KEY
|
||||
symbol text UNIQUE NOT NULL
|
||||
isin text UNIQUE NOT NULL
|
||||
company_name text NOT NULL
|
||||
|
@ -7,5 +7,5 @@ CREATE TABLE companies (
|
|||
sector text NOT NULL
|
||||
industry text NOT NULL
|
||||
primary_sic_code text NOT NULL
|
||||
employees integer NOT NULL
|
||||
employees bigint NOT NULL
|
||||
)
|
1
src/libtrader/db/sql/001_schema_asset.sql
Normal file
1
src/libtrader/db/sql/001_schema_asset.sql
Normal file
|
@ -0,0 +1 @@
|
|||
CREATE SCHEMA asset;
|
8
src/libtrader/db/sql/002_table_stock.sql
Normal file
8
src/libtrader/db/sql/002_table_stock.sql
Normal file
|
@ -0,0 +1,8 @@
|
|||
CREATE TABLE asset.stock_vals (
|
||||
id BIGSERIAL PRIMARY KEY
|
||||
isin text NOT NULL
|
||||
time_since_epoch timestamp NOT NULL
|
||||
ask_price numeric NOT NULL
|
||||
bid_price numeric NOT NULL
|
||||
volume bigint NOT NULL
|
||||
)
|
Loading…
Reference in New Issue
Block a user