Refactor code structure for improved readability and maintainability

This commit is contained in:
Torsten Brendgen
2026-05-16 16:45:28 +02:00
parent 14f856fdb3
commit 96a3e98109
426 changed files with 29236 additions and 114 deletions

View File

@@ -0,0 +1,119 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Microsoft.SelfService.Portal.Core.API.Migrations
{
/// <inheritdoc />
public partial class AddEnvironmentAndTargetProviderModel : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "ExternalId",
table: "VirtualMachines",
type: "nvarchar(max)",
nullable: true)
.Annotation("Relational:ColumnOrder", 5);
migrationBuilder.AddColumn<string>(
name: "MetadataJson",
table: "VirtualMachines",
type: "nvarchar(max)",
nullable: true)
.Annotation("Relational:ColumnOrder", 6);
migrationBuilder.AddColumn<string>(
name: "ProviderType",
table: "VirtualMachines",
type: "nvarchar(max)",
nullable: true)
.Annotation("Relational:ColumnOrder", 4);
migrationBuilder.AddColumn<string>(
name: "TargetType",
table: "VirtualMachines",
type: "nvarchar(max)",
nullable: false,
defaultValue: "")
.Annotation("Relational:ColumnOrder", 3);
migrationBuilder.AddColumn<string>(
name: "EnvironmentType",
table: "Environments",
type: "nvarchar(max)",
nullable: false,
defaultValue: "")
.Annotation("Relational:ColumnOrder", 3);
migrationBuilder.AddColumn<string>(
name: "MetadataJson",
table: "Environments",
type: "nvarchar(max)",
nullable: true)
.Annotation("Relational:ColumnOrder", 7);
migrationBuilder.AddColumn<string>(
name: "ProviderType",
table: "Environments",
type: "nvarchar(max)",
nullable: true)
.Annotation("Relational:ColumnOrder", 4);
migrationBuilder.AddColumn<string>(
name: "SubscriptionId",
table: "Environments",
type: "nvarchar(max)",
nullable: true)
.Annotation("Relational:ColumnOrder", 6);
migrationBuilder.AddColumn<string>(
name: "TenantId",
table: "Environments",
type: "nvarchar(max)",
nullable: true)
.Annotation("Relational:ColumnOrder", 5);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ExternalId",
table: "VirtualMachines");
migrationBuilder.DropColumn(
name: "MetadataJson",
table: "VirtualMachines");
migrationBuilder.DropColumn(
name: "ProviderType",
table: "VirtualMachines");
migrationBuilder.DropColumn(
name: "TargetType",
table: "VirtualMachines");
migrationBuilder.DropColumn(
name: "EnvironmentType",
table: "Environments");
migrationBuilder.DropColumn(
name: "MetadataJson",
table: "Environments");
migrationBuilder.DropColumn(
name: "ProviderType",
table: "Environments");
migrationBuilder.DropColumn(
name: "SubscriptionId",
table: "Environments");
migrationBuilder.DropColumn(
name: "TenantId",
table: "Environments");
}
}
}