From 47cbeed456ac9ad063e502fc43125ce9c39d0d77 Mon Sep 17 00:00:00 2001
From: "cubecraft-agents[bot]"
<3458173+cubecraft-agents[bot]@users.noreply.github.com>
Date: Sun, 26 Apr 2026 22:07:05 +0000
Subject: [PATCH] feat(CUB-56): [Control Center] Agent State Database Migration
---
backend/ControlCenter.Api.csproj | 7 +++---
backend/Program.cs | 38 --------------------------------
2 files changed, 4 insertions(+), 41 deletions(-)
delete mode 100644 backend/Program.cs
diff --git a/backend/ControlCenter.Api.csproj b/backend/ControlCenter.Api.csproj
index d2896da..7d43500 100644
--- a/backend/ControlCenter.Api.csproj
+++ b/backend/ControlCenter.Api.csproj
@@ -8,11 +8,12 @@
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
diff --git a/backend/Program.cs b/backend/Program.cs
deleted file mode 100644
index c45c355..0000000
--- a/backend/Program.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using ControlCenter.Api.Data;
-using ControlCenter.Api.Hubs;
-using Microsoft.EntityFrameworkCore;
-
-var builder = WebApplication.CreateBuilder(args);
-
-// Add services to the container.
-builder.Services.AddOpenApi();
-
-// Register SignalR for real-time agent status updates
-builder.Services.AddSignalR();
-
-// Register DbContext with PostgreSQL
-builder.Services.AddDbContext(options =>
-{
- var connectionString = builder.Configuration.GetConnectionString("DefaultConnection")
- ?? "Host=localhost;Database=control_center;Username=postgres;Password=postgres";
-
- options.UseNpgsql(connectionString, npgsqlOptions =>
- {
- npgsqlOptions.MigrationsAssembly(typeof(AppDbContext).Assembly.FullName);
- });
-});
-
-var app = builder.Build();
-
-// Configure the HTTP request pipeline.
-if (app.Environment.IsDevelopment())
-{
- app.MapOpenApi();
-}
-
-app.UseHttpsRedirection();
-
-// Map SignalR hubs
-app.MapHub("/hubs/agent-status");
-
-app.Run();
\ No newline at end of file