Files
DiunaBI/WebAPI/Migrations/20240703171630_AfterCodeRefactor.cs
Michał Zieliski 17037a1a3d Migrations
2024-07-03 19:22:11 +02:00

136 lines
4.1 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WebAPI.Migrations
{
/// <inheritdoc />
public partial class AfterCodeRefactor : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Desc2",
table: "Records");
migrationBuilder.DropColumn(
name: "Desc3",
table: "Records");
migrationBuilder.DropColumn(
name: "Desc4",
table: "Records");
migrationBuilder.DropColumn(
name: "Desc5",
table: "Records");
migrationBuilder.AlterColumn<string>(
name: "Email",
table: "Users",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Desc1",
table: "Records",
type: "nvarchar(1000)",
maxLength: 1000,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Code",
table: "Records",
type: "nvarchar(50)",
maxLength: 50,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "Layers",
type: "nvarchar(50)",
maxLength: 50,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Email",
table: "Users",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Desc1",
table: "Records",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(1000)",
oldMaxLength: 1000,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Code",
table: "Records",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50);
migrationBuilder.AddColumn<string>(
name: "Desc2",
table: "Records",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Desc3",
table: "Records",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Desc4",
table: "Records",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Desc5",
table: "Records",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "Layers",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50);
}
}
}