This repository has been archived on 2023-02-13. You can view files and clone it, but cannot push or open issues or pull requests.
gswi-server/gswi.Data/Migrations/20210220140309_2021_03_14.cs
2022-02-20 19:04:11 +01:00

54 lines
1.7 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
namespace gswi.Data.Migrations
{
public partial class _2021_03_14 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_Users_Discriminator_Name",
table: "Users");
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "Users",
nullable: true,
oldClrType: typeof(string),
oldType: "varchar(255) CHARACTER SET utf8mb4",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Discriminator",
table: "Users",
nullable: false,
oldClrType: typeof(string),
oldType: "varchar(255) CHARACTER SET utf8mb4");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "Users",
type: "varchar(255) CHARACTER SET utf8mb4",
nullable: true,
oldClrType: typeof(string),
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Discriminator",
table: "Users",
type: "varchar(255) CHARACTER SET utf8mb4",
nullable: false,
oldClrType: typeof(string));
migrationBuilder.CreateIndex(
name: "IX_Users_Discriminator_Name",
table: "Users",
columns: new[] { "Discriminator", "Name" },
unique: true);
}
}
}