добавил миграцию
test / deploy_trader_prod (push) Successful in 4m33s Details

main
vlad zverzhkhovskiy 2025-09-02 14:43:43 +03:00
parent 62de4169b8
commit 8edb4351dd
1 changed files with 10 additions and 8 deletions

View File

@ -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);