2025-05-31 19:26:02 +02:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
2025-11-05 20:50:25 +01:00
|
|
|
|
namespace DiunaBI.Infrastructure.Migrations
|
2025-05-31 19:26:02 +02:00
|
|
|
|
{
|
|
|
|
|
|
/// <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);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|