using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace TaskManager.EntityFramework.Migrations { /// public partial class z202506090001 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "UpdateUser", table: "TaskSub", type: "nvarchar(30)", maxLength: 30, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "TaskName", table: "TaskSub", type: "nvarchar(30)", maxLength: 30, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "TableName", table: "TaskSub", type: "nvarchar(30)", maxLength: 30, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Subscriber", table: "TaskSub", type: "nvarchar(30)", maxLength: 30, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Site", table: "TaskSub", type: "nvarchar(30)", maxLength: 30, nullable: false, oldClrType: typeof(string), oldType: "nvarchar(max)"); migrationBuilder.AlterColumn( name: "FailedInfo", table: "TaskSub", type: "nvarchar(30)", maxLength: 30, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Domain", table: "TaskSub", type: "nvarchar(30)", maxLength: 30, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "CreateUser", table: "TaskSub", type: "nvarchar(30)", maxLength: 30, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Type", table: "TaskLogs", type: "nvarchar(20)", maxLength: 20, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "TaskName", table: "TaskLogs", type: "nvarchar(20)", maxLength: 20, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Info", table: "TaskLogs", type: "nvarchar(20)", maxLength: 20, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "CreationTime", table: "TaskLogs", type: "datetime2", nullable: true, oldClrType: typeof(DateTime), oldType: "datetime2"); migrationBuilder.AddColumn( name: "Path", table: "TaskLogs", type: "nvarchar(20)", maxLength: 20, nullable: true); migrationBuilder.AddColumn( name: "Version", table: "TaskLogs", type: "nvarchar(20)", maxLength: 20, nullable: true); migrationBuilder.AlterColumn( name: "QuantityDelivery", table: "SUPPLIER_PO", type: "decimal(18,2)", nullable: true, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "Note", table: "SUPPLIER_PO", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(50)", oldMaxLength: 50, oldNullable: true); migrationBuilder.AlterColumn( name: "QuantityDemand2", table: "SUPPLIER_MRP_DATE", type: "decimal(18,2)", nullable: true, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "QuantityDemand1", table: "SUPPLIER_MRP_DATE", type: "decimal(18,2)", nullable: true, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "IsDelete", table: "SUPPLIER_INV_DATA", type: "nvarchar(max)", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "QuantityDelivery", table: "SUPPLIER_DEL_STATE", type: "decimal(18,2)", nullable: true, oldClrType: typeof(int), oldType: "int"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "Path", table: "TaskLogs"); migrationBuilder.DropColumn( name: "Version", table: "TaskLogs"); migrationBuilder.AlterColumn( name: "UpdateUser", table: "TaskSub", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(30)", oldMaxLength: 30, oldNullable: true); migrationBuilder.AlterColumn( name: "TaskName", table: "TaskSub", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(30)", oldMaxLength: 30, oldNullable: true); migrationBuilder.AlterColumn( name: "TableName", table: "TaskSub", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(30)", oldMaxLength: 30, oldNullable: true); migrationBuilder.AlterColumn( name: "Subscriber", table: "TaskSub", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(30)", oldMaxLength: 30, oldNullable: true); migrationBuilder.AlterColumn( name: "Site", table: "TaskSub", type: "nvarchar(max)", nullable: false, oldClrType: typeof(string), oldType: "nvarchar(30)", oldMaxLength: 30); migrationBuilder.AlterColumn( name: "FailedInfo", table: "TaskSub", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(30)", oldMaxLength: 30, oldNullable: true); migrationBuilder.AlterColumn( name: "Domain", table: "TaskSub", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(30)", oldMaxLength: 30, oldNullable: true); migrationBuilder.AlterColumn( name: "CreateUser", table: "TaskSub", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(30)", oldMaxLength: 30, oldNullable: true); migrationBuilder.AlterColumn( name: "Type", table: "TaskLogs", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20, oldNullable: true); migrationBuilder.AlterColumn( name: "TaskName", table: "TaskLogs", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20, oldNullable: true); migrationBuilder.AlterColumn( name: "Info", table: "TaskLogs", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20, oldNullable: true); migrationBuilder.AlterColumn( name: "CreationTime", table: "TaskLogs", type: "datetime2", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), oldClrType: typeof(DateTime), oldType: "datetime2", oldNullable: true); migrationBuilder.AlterColumn( name: "QuantityDelivery", table: "SUPPLIER_PO", type: "int", nullable: false, defaultValue: 0, oldClrType: typeof(decimal), oldType: "decimal(18,2)", oldNullable: true); migrationBuilder.AlterColumn( name: "Note", table: "SUPPLIER_PO", type: "nvarchar(50)", maxLength: 50, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "QuantityDemand2", table: "SUPPLIER_MRP_DATE", type: "int", nullable: false, defaultValue: 0, oldClrType: typeof(decimal), oldType: "decimal(18,2)", oldNullable: true); migrationBuilder.AlterColumn( name: "QuantityDemand1", table: "SUPPLIER_MRP_DATE", type: "int", nullable: false, defaultValue: 0, oldClrType: typeof(decimal), oldType: "decimal(18,2)", oldNullable: true); migrationBuilder.AlterColumn( name: "IsDelete", table: "SUPPLIER_INV_DATA", type: "int", nullable: false, oldClrType: typeof(string), oldType: "nvarchar(max)"); migrationBuilder.AlterColumn( name: "QuantityDelivery", table: "SUPPLIER_DEL_STATE", type: "int", nullable: false, defaultValue: 0, oldClrType: typeof(decimal), oldType: "decimal(18,2)", oldNullable: true); } } }