diff --git a/src/PolyTrader.Core/Persistence/Ef/CoreDbContext.cs b/src/PolyTrader.Core/Persistence/Ef/CoreDbContext.cs index 13f0909..4838537 100644 --- a/src/PolyTrader.Core/Persistence/Ef/CoreDbContext.cs +++ b/src/PolyTrader.Core/Persistence/Ef/CoreDbContext.cs @@ -21,7 +21,7 @@ namespace PolyTrader.Core.Persistence.Ef { b.Entity(e => { - e.ToTable("accounts"); + e.ToTable("core_accounts"); e.HasKey(x => x.AccountId); e.Property(x => x.AccountId).ValueGeneratedNever(); e.Ignore(x => x.OpenPositions); // Runtime-Only (In-Memory Hot-Path) @@ -39,7 +39,7 @@ namespace PolyTrader.Core.Persistence.Ef b.Entity(e => { - e.ToTable("positions"); + e.ToTable("core_positions"); e.HasKey(x => new { x.AccountId, x.IsDemo, x.TokenId }); e.Property(x => x.TokenId).HasMaxLength(120); e.Property(x => x.MarketSlug).HasMaxLength(300); @@ -58,7 +58,7 @@ namespace PolyTrader.Core.Persistence.Ef b.Entity(e => { - e.ToTable("markets"); + e.ToTable("core_markets"); e.HasKey(x => x.Id); e.Property(x => x.Id).HasMaxLength(120); e.Property(x => x.ConditionId).HasMaxLength(120); @@ -71,7 +71,7 @@ namespace PolyTrader.Core.Persistence.Ef b.Entity(e => { - e.ToTable("trade_log"); + e.ToTable("core_trade_log"); e.HasKey(x => x.Id); e.Property(x => x.Id).HasMaxLength(64); e.Property(x => x.ModuleName).HasMaxLength(64); diff --git a/src/PolyTrader.Core/Persistence/Ef/Migrations/20260705112545_InitialCore.Designer.cs b/src/PolyTrader.Core/Persistence/Ef/Migrations/20260705113713_InitialCore.Designer.cs similarity index 97% rename from src/PolyTrader.Core/Persistence/Ef/Migrations/20260705112545_InitialCore.Designer.cs rename to src/PolyTrader.Core/Persistence/Ef/Migrations/20260705113713_InitialCore.Designer.cs index 7ad0bac..2a537e4 100644 --- a/src/PolyTrader.Core/Persistence/Ef/Migrations/20260705112545_InitialCore.Designer.cs +++ b/src/PolyTrader.Core/Persistence/Ef/Migrations/20260705113713_InitialCore.Designer.cs @@ -12,7 +12,7 @@ using PolyTrader.Core.Persistence.Ef; namespace PolyTrader.Core.Persistence.Ef.Migrations { [DbContext(typeof(CoreDbContext))] - [Migration("20260705112545_InitialCore")] + [Migration("20260705113713_InitialCore")] partial class InitialCore { /// @@ -91,7 +91,7 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations b.HasKey("AccountId"); - b.ToTable("accounts", (string)null); + b.ToTable("core_accounts", (string)null); }); modelBuilder.Entity("PolyTraderSharp.Models.MarketData", b => @@ -142,7 +142,7 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations b.HasKey("Id"); - b.ToTable("markets", (string)null); + b.ToTable("core_markets", (string)null); }); modelBuilder.Entity("PolyTraderSharp.Models.Position", b => @@ -223,7 +223,7 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations b.HasKey("AccountId", "IsDemo", "TokenId"); - b.ToTable("positions", (string)null); + b.ToTable("core_positions", (string)null); }); modelBuilder.Entity("PolyTraderSharp.Models.TradeRecord", b => @@ -302,7 +302,7 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations b.HasIndex("ModuleName"); - b.ToTable("trade_log", (string)null); + b.ToTable("core_trade_log", (string)null); }); #pragma warning restore 612, 618 } diff --git a/src/PolyTrader.Core/Persistence/Ef/Migrations/20260705112545_InitialCore.cs b/src/PolyTrader.Core/Persistence/Ef/Migrations/20260705113713_InitialCore.cs similarity index 91% rename from src/PolyTrader.Core/Persistence/Ef/Migrations/20260705112545_InitialCore.cs rename to src/PolyTrader.Core/Persistence/Ef/Migrations/20260705113713_InitialCore.cs index f6df15b..402be59 100644 --- a/src/PolyTrader.Core/Persistence/Ef/Migrations/20260705112545_InitialCore.cs +++ b/src/PolyTrader.Core/Persistence/Ef/Migrations/20260705113713_InitialCore.cs @@ -15,7 +15,7 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "accounts", + name: "core_accounts", columns: table => new { AccountId = table.Column(type: "int", nullable: false), @@ -43,12 +43,12 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations }, constraints: table => { - table.PrimaryKey("PK_accounts", x => x.AccountId); + table.PrimaryKey("PK_core_accounts", x => x.AccountId); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "markets", + name: "core_markets", columns: table => new { Id = table.Column(type: "varchar(120)", maxLength: 120, nullable: false) @@ -72,12 +72,12 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations }, constraints: table => { - table.PrimaryKey("PK_markets", x => x.Id); + table.PrimaryKey("PK_core_markets", x => x.Id); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "positions", + name: "core_positions", columns: table => new { AccountId = table.Column(type: "int", nullable: false), @@ -109,12 +109,12 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations }, constraints: table => { - table.PrimaryKey("PK_positions", x => new { x.AccountId, x.IsDemo, x.TokenId }); + table.PrimaryKey("PK_core_positions", x => new { x.AccountId, x.IsDemo, x.TokenId }); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "trade_log", + name: "core_trade_log", columns: table => new { Id = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) @@ -143,23 +143,23 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations }, constraints: table => { - table.PrimaryKey("PK_trade_log", x => x.Id); + table.PrimaryKey("PK_core_trade_log", x => x.Id); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateIndex( - name: "IX_trade_log_AccountId", - table: "trade_log", + name: "IX_core_trade_log_AccountId", + table: "core_trade_log", column: "AccountId"); migrationBuilder.CreateIndex( - name: "IX_trade_log_ClosedAt", - table: "trade_log", + name: "IX_core_trade_log_ClosedAt", + table: "core_trade_log", column: "ClosedAt"); migrationBuilder.CreateIndex( - name: "IX_trade_log_ModuleName", - table: "trade_log", + name: "IX_core_trade_log_ModuleName", + table: "core_trade_log", column: "ModuleName"); } @@ -167,16 +167,16 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( - name: "accounts"); + name: "core_accounts"); migrationBuilder.DropTable( - name: "markets"); + name: "core_markets"); migrationBuilder.DropTable( - name: "positions"); + name: "core_positions"); migrationBuilder.DropTable( - name: "trade_log"); + name: "core_trade_log"); } } } diff --git a/src/PolyTrader.Core/Persistence/Ef/Migrations/CoreDbContextModelSnapshot.cs b/src/PolyTrader.Core/Persistence/Ef/Migrations/CoreDbContextModelSnapshot.cs index 0b07bcd..6c90521 100644 --- a/src/PolyTrader.Core/Persistence/Ef/Migrations/CoreDbContextModelSnapshot.cs +++ b/src/PolyTrader.Core/Persistence/Ef/Migrations/CoreDbContextModelSnapshot.cs @@ -88,7 +88,7 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations b.HasKey("AccountId"); - b.ToTable("accounts", (string)null); + b.ToTable("core_accounts", (string)null); }); modelBuilder.Entity("PolyTraderSharp.Models.MarketData", b => @@ -139,7 +139,7 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations b.HasKey("Id"); - b.ToTable("markets", (string)null); + b.ToTable("core_markets", (string)null); }); modelBuilder.Entity("PolyTraderSharp.Models.Position", b => @@ -220,7 +220,7 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations b.HasKey("AccountId", "IsDemo", "TokenId"); - b.ToTable("positions", (string)null); + b.ToTable("core_positions", (string)null); }); modelBuilder.Entity("PolyTraderSharp.Models.TradeRecord", b => @@ -299,7 +299,7 @@ namespace PolyTrader.Core.Persistence.Ef.Migrations b.HasIndex("ModuleName"); - b.ToTable("trade_log", (string)null); + b.ToTable("core_trade_log", (string)null); }); #pragma warning restore 612, 618 }