add: sql init scripts execution
This commit is contained in:
parent
21ca337e7f
commit
462ee42f98
|
@ -13,6 +13,7 @@ services:
|
|||
- 5432:5432
|
||||
volumes:
|
||||
- ./.db:/var/lib/postgresql/data
|
||||
- ../src/libtrader/db/sql:/docker-entrypoint-initdb.d/
|
||||
adminer:
|
||||
container_name: pt_admin
|
||||
image: adminer
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
CREATE TABLE companies (
|
||||
id BIGSERIAL PRIMARY KEY
|
||||
symbol text UNIQUE NOT NULL
|
||||
isin text UNIQUE NOT NULL
|
||||
company_name text NOT NULL
|
||||
primary_exchange text NOT NULL
|
||||
sector text NOT NULL
|
||||
industry text NOT NULL
|
||||
primary_sic_code text NOT NULL
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
symbol text UNIQUE NOT NULL,
|
||||
isin text UNIQUE NOT NULL,
|
||||
company_name text NOT NULL,
|
||||
primary_exchange text NOT NULL,
|
||||
sector text NOT NULL,
|
||||
industry text NOT NULL,
|
||||
primary_sic_code text NOT NULL,
|
||||
employees bigint NOT NULL
|
||||
)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
CREATE TABLE asset_schema.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
|
||||
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
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
CREATE TABLE sessions_schema.sessions (
|
||||
sess_id text NOT NULL
|
||||
client_ip text NOT NULL
|
||||
expiry_date timestamp NOT NULL
|
||||
sess_id text NOT NULL,
|
||||
client_ip text NOT NULL,
|
||||
expiry_date timestamp NOT NULL,
|
||||
is_active bool NOT NULL
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user