добавил миграцию
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; drop table if exists orderbook_items;
create table instrument_trades create table orderbook_items
( (
trade_id bigserial, id bigserial,
bought_at timestamp default current_timestamp, time timestamp default current_timestamp,
figi text not null, figi text not null,
ticker text not null, ticker text not null,
price decimal not null, price decimal not null,
count decimal not null, count bigint not null,
direction int not null default 1, item_type int not null default 1,
primary key (trade_id) primary key (id)
); );
CREATE INDEX orderbook_items_index ON orderbook_items USING btree(figi, time, item_type);