добавил миграцию
test / deploy_trader_prod (push) Successful in 4m33s
Details
test / deploy_trader_prod (push) Successful in 4m33s
Details
parent
62de4169b8
commit
8edb4351dd
|
@ -1,12 +1,14 @@
|
|||
drop table if exists instrument_trades;
|
||||
create table instrument_trades
|
||||
drop table if exists orderbook_items;
|
||||
create table orderbook_items
|
||||
(
|
||||
trade_id bigserial,
|
||||
bought_at timestamp default current_timestamp,
|
||||
id bigserial,
|
||||
time timestamp default current_timestamp,
|
||||
figi text not null,
|
||||
ticker text not null,
|
||||
price decimal not null,
|
||||
count decimal not null,
|
||||
direction int not null default 1,
|
||||
primary key (trade_id)
|
||||
);
|
||||
count bigint not null,
|
||||
item_type int not null default 1,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
CREATE INDEX orderbook_items_index ON orderbook_items USING btree(figi, time, item_type);
|
Loading…
Reference in New Issue