86 lines
3.0 KiB
C#
86 lines
3.0 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Microsoft.SelfService.Portal.Core.API.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class RemoveVirtualMachineTargetAndProvider : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "ProviderType",
|
|
table: "VirtualMachines");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "TargetType",
|
|
table: "VirtualMachines");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MetadataJson",
|
|
table: "VirtualMachines",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true)
|
|
.Annotation("Relational:ColumnOrder", 4)
|
|
.OldAnnotation("Relational:ColumnOrder", 6);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "ExternalId",
|
|
table: "VirtualMachines",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true)
|
|
.Annotation("Relational:ColumnOrder", 3)
|
|
.OldAnnotation("Relational:ColumnOrder", 5);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MetadataJson",
|
|
table: "VirtualMachines",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true)
|
|
.Annotation("Relational:ColumnOrder", 6)
|
|
.OldAnnotation("Relational:ColumnOrder", 4);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "ExternalId",
|
|
table: "VirtualMachines",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true)
|
|
.Annotation("Relational:ColumnOrder", 5)
|
|
.OldAnnotation("Relational:ColumnOrder", 3);
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|