From 7424cdd5ca6c06ff3487f0d02946402c4f93ff05 Mon Sep 17 00:00:00 2001 From: vlad zverzhkhovskiy Date: Mon, 1 Sep 2025 15:39:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BC=D0=B5=D0=BB=D0=BE=D1=87=D0=B8=20=D0=BA?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D1=88=D0=BB=D0=BE=D0=BC=D1=83=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=BC=D0=B8=D1=82=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Exchange/Services/ExchangeDataReader.cs | 1 - .../postgres/migration1.sql | 0 KLHZ.Trader.Infrastructure/postgres/migration2.sql | 12 ++++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) rename migration1.sql => KLHZ.Trader.Infrastructure/postgres/migration1.sql (100%) create mode 100644 KLHZ.Trader.Infrastructure/postgres/migration2.sql diff --git a/KLHZ.Trader.Core/Exchange/Services/ExchangeDataReader.cs b/KLHZ.Trader.Core/Exchange/Services/ExchangeDataReader.cs index 818688f..c2d69aa 100644 --- a/KLHZ.Trader.Core/Exchange/Services/ExchangeDataReader.cs +++ b/KLHZ.Trader.Core/Exchange/Services/ExchangeDataReader.cs @@ -95,7 +95,6 @@ namespace KLHZ.Trader.Core.Exchange.Services SubscriptionAction = SubscriptionAction.Subscribe }; - var tradesRequest = new SubscribeTradesRequest { SubscriptionAction = SubscriptionAction.Subscribe diff --git a/migration1.sql b/KLHZ.Trader.Infrastructure/postgres/migration1.sql similarity index 100% rename from migration1.sql rename to KLHZ.Trader.Infrastructure/postgres/migration1.sql diff --git a/KLHZ.Trader.Infrastructure/postgres/migration2.sql b/KLHZ.Trader.Infrastructure/postgres/migration2.sql new file mode 100644 index 0000000..52606f7 --- /dev/null +++ b/KLHZ.Trader.Infrastructure/postgres/migration2.sql @@ -0,0 +1,12 @@ +drop table if exists instrument_trades; +create table instrument_trades +( + trade_id bigserial, + bought_at 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) +); \ No newline at end of file