using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DiunaBI.Infrastructure.Migrations { /// public partial class RenameFields : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.RenameColumn( name: "MPK", table: "DataRows", newName: "Code"); migrationBuilder.AlterColumn( name: "Number", table: "DataSets", type: "int", nullable: false, oldClrType: typeof(string), oldType: "nvarchar(max)"); migrationBuilder.AlterColumn( name: "Name", table: "DataSets", type: "nvarchar(max)", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AddColumn( name: "Source", table: "DataSets", type: "nvarchar(max)", nullable: false, defaultValue: ""); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "Source", table: "DataSets"); migrationBuilder.RenameColumn( name: "Code", table: "DataRows", newName: "MPK"); migrationBuilder.AlterColumn( name: "Number", table: "DataSets", type: "nvarchar(max)", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "Name", table: "DataSets", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)"); } } }