139 lines
5.1 KiB
C#
139 lines
5.1 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Microsoft.SelfService.Portal.Core.API.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class RemoveCloudEnabledFromEnvironment : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "CloudEnabled",
|
|
table: "Environments");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "TenantId",
|
|
table: "Environments",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true)
|
|
.Annotation("Relational:ColumnOrder", 4)
|
|
.OldAnnotation("Relational:ColumnOrder", 5);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "SubscriptionId",
|
|
table: "Environments",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true)
|
|
.Annotation("Relational:ColumnOrder", 5)
|
|
.OldAnnotation("Relational:ColumnOrder", 6);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "ProviderType",
|
|
table: "Environments",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true)
|
|
.Annotation("Relational:ColumnOrder", 3)
|
|
.OldAnnotation("Relational:ColumnOrder", 4);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MetadataJson",
|
|
table: "Environments",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true)
|
|
.Annotation("Relational:ColumnOrder", 6)
|
|
.OldAnnotation("Relational:ColumnOrder", 7);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "EnvironmentType",
|
|
table: "Environments",
|
|
type: "nvarchar(max)",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)")
|
|
.Annotation("Relational:ColumnOrder", 2)
|
|
.OldAnnotation("Relational:ColumnOrder", 3);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "TenantId",
|
|
table: "Environments",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true)
|
|
.Annotation("Relational:ColumnOrder", 5)
|
|
.OldAnnotation("Relational:ColumnOrder", 4);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "SubscriptionId",
|
|
table: "Environments",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true)
|
|
.Annotation("Relational:ColumnOrder", 6)
|
|
.OldAnnotation("Relational:ColumnOrder", 5);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "ProviderType",
|
|
table: "Environments",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true)
|
|
.Annotation("Relational:ColumnOrder", 4)
|
|
.OldAnnotation("Relational:ColumnOrder", 3);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MetadataJson",
|
|
table: "Environments",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true)
|
|
.Annotation("Relational:ColumnOrder", 7)
|
|
.OldAnnotation("Relational:ColumnOrder", 6);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "EnvironmentType",
|
|
table: "Environments",
|
|
type: "nvarchar(max)",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)")
|
|
.Annotation("Relational:ColumnOrder", 3)
|
|
.OldAnnotation("Relational:ColumnOrder", 2);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "CloudEnabled",
|
|
table: "Environments",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: false)
|
|
.Annotation("Relational:ColumnOrder", 2);
|
|
}
|
|
}
|
|
}
|