using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace WCS.Service.Migrations { public partial class _7 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "USER_TEXT", table: "WCS_Users", type: "varbinary(max)", nullable: true, oldClrType: typeof(byte[]), oldType: "varbinary(max)"); migrationBuilder.AlterColumn( name: "TaskGroupKey", table: "WCS_TASK", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)"); migrationBuilder.AlterColumn( name: "TUNNEL", table: "WCS_TASK", type: "nvarchar(10)", maxLength: 10, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(10)", oldMaxLength: 10); migrationBuilder.AlterColumn( name: "SCSTATION", table: "WCS_TASK", type: "nvarchar(20)", maxLength: 20, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20); migrationBuilder.AlterColumn( name: "DEVICE", table: "WCS_TASK", type: "nvarchar(20)", maxLength: 20, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20); migrationBuilder.AlterColumn( name: "BARCODE", table: "WCS_TASK", type: "nvarchar(50)", maxLength: 50, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(50)", oldMaxLength: 50); migrationBuilder.AlterColumn( name: "ADDRTO", table: "WCS_TASK", type: "nvarchar(20)", maxLength: 20, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20); migrationBuilder.AlterColumn( name: "ADDRNEXT", table: "WCS_TASK", type: "nvarchar(20)", maxLength: 20, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20); migrationBuilder.AlterColumn( name: "ADDRFROM", table: "WCS_TASK", type: "nvarchar(20)", maxLength: 20, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20); migrationBuilder.AlterColumn( name: "TUNNEL", table: "WCS_SystemConfig", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)"); migrationBuilder.AlterColumn( name: "Direction", table: "WCS_SystemConfig", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)"); migrationBuilder.AlterColumn( name: "Describe", table: "WCS_SystemConfig", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)"); migrationBuilder.AlterColumn( name: "DEVICECODE", table: "WCS_SystemConfig", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)"); migrationBuilder.AlterColumn( name: "Code", table: "WCS_SystemConfig", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)"); migrationBuilder.AlterColumn( name: "Node", table: "WCS_StatusLog", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)"); migrationBuilder.AddColumn( name: "msg", table: "WCS_StatusLog", type: "nvarchar(max)", nullable: true); migrationBuilder.AddColumn( name: "DEVICE", table: "WCS_EXCEPTION", type: "nvarchar(1000)", maxLength: 1000, nullable: true); migrationBuilder.AddColumn( name: "EXCEPTIONTYPE", table: "WCS_EXCEPTION", type: "nvarchar(1000)", maxLength: 1000, nullable: true); migrationBuilder.AlterColumn( name: "Content", table: "WCS_BCR80", type: "nvarchar(130)", maxLength: 130, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(130)", oldMaxLength: 130); migrationBuilder.AlterColumn( name: "Station", table: "WCS_AGVTask", type: "nvarchar(20)", maxLength: 20, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20); migrationBuilder.AlterColumn( name: "AGVID", table: "WCS_AGVTask", type: "nvarchar(20)", maxLength: 20, nullable: true, oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "msg", table: "WCS_StatusLog"); migrationBuilder.DropColumn( name: "DEVICE", table: "WCS_EXCEPTION"); migrationBuilder.DropColumn( name: "EXCEPTIONTYPE", table: "WCS_EXCEPTION"); migrationBuilder.AlterColumn( name: "USER_TEXT", table: "WCS_Users", type: "varbinary(max)", nullable: false, defaultValue: new byte[0], oldClrType: typeof(byte[]), oldType: "varbinary(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "TaskGroupKey", table: "WCS_TASK", type: "nvarchar(max)", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "TUNNEL", table: "WCS_TASK", type: "nvarchar(10)", maxLength: 10, nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(10)", oldMaxLength: 10, oldNullable: true); migrationBuilder.AlterColumn( name: "SCSTATION", table: "WCS_TASK", type: "nvarchar(20)", maxLength: 20, nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20, oldNullable: true); migrationBuilder.AlterColumn( name: "DEVICE", table: "WCS_TASK", type: "nvarchar(20)", maxLength: 20, nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20, oldNullable: true); migrationBuilder.AlterColumn( name: "BARCODE", table: "WCS_TASK", type: "nvarchar(50)", maxLength: 50, nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(50)", oldMaxLength: 50, oldNullable: true); migrationBuilder.AlterColumn( name: "ADDRTO", table: "WCS_TASK", type: "nvarchar(20)", maxLength: 20, nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20, oldNullable: true); migrationBuilder.AlterColumn( name: "ADDRNEXT", table: "WCS_TASK", type: "nvarchar(20)", maxLength: 20, nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20, oldNullable: true); migrationBuilder.AlterColumn( name: "ADDRFROM", table: "WCS_TASK", type: "nvarchar(20)", maxLength: 20, nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20, oldNullable: true); migrationBuilder.AlterColumn( name: "TUNNEL", table: "WCS_SystemConfig", type: "nvarchar(max)", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Direction", table: "WCS_SystemConfig", type: "nvarchar(max)", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Describe", table: "WCS_SystemConfig", type: "nvarchar(max)", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "DEVICECODE", table: "WCS_SystemConfig", type: "nvarchar(max)", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Code", table: "WCS_SystemConfig", type: "nvarchar(max)", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Node", table: "WCS_StatusLog", type: "nvarchar(max)", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Content", table: "WCS_BCR80", type: "nvarchar(130)", maxLength: 130, nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(130)", oldMaxLength: 130, oldNullable: true); migrationBuilder.AlterColumn( name: "Station", table: "WCS_AGVTask", type: "nvarchar(20)", maxLength: 20, nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20, oldNullable: true); migrationBuilder.AlterColumn( name: "AGVID", table: "WCS_AGVTask", type: "nvarchar(20)", maxLength: 20, nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(20)", oldMaxLength: 20, oldNullable: true); } } }