using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace PSTW_CentralSystem.Migrations { /// public partial class UpdateItemModel : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "QuantityProduct", table: "Products", type: "int", nullable: true, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "ItemID", table: "Items", type: "int", nullable: false, oldClrType: typeof(string), oldType: "varchar(255)") .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn) .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "UniqueID", table: "Items", type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.UpdateData( table: "AspNetUsers", keyColumn: "Id", keyValue: 1, columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, values: new object[] { "a04422b5-87e6-445c-9640-91f82b7ab925", "AQAAAAIAAYagAAAAECKZDbSSf9PVXnc5gc11ayb/qGSLIVi595BpbLpr4GeEDCONiPEEGeKOF7Hmt2evRA==", "a9620efc-3783-46d6-a769-9fa7b0cca19b" }); migrationBuilder.UpdateData( table: "AspNetUsers", keyColumn: "Id", keyValue: 2, columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, values: new object[] { "608f450b-bfc3-4e15-a815-c9f25e0b92f4", "AQAAAAIAAYagAAAAED3P9MR4LRFRqUDqLBBwF3lpXLNrOzcoEkMjr2SJSU2u2z0mvwXXGtZO3wPy8PcwQQ==", "0282ae31-790c-403a-8f42-3596b2d1e454" }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "UniqueID", table: "Items"); migrationBuilder.AlterColumn( name: "QuantityProduct", table: "Products", type: "int", nullable: false, defaultValue: 0, oldClrType: typeof(int), oldType: "int", oldNullable: true); migrationBuilder.AlterColumn( name: "ItemID", table: "Items", type: "varchar(255)", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.UpdateData( table: "AspNetUsers", keyColumn: "Id", keyValue: 1, columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, values: new object[] { "dde44c98-793e-452c-8123-5252dc03d655", "AQAAAAIAAYagAAAAEF/vIsmJIWgsCX1cyJiM/miWN66l6UKVbXIY07eBwo/kOy6xL5olLByKrgW7MdbadQ==", "1e63fa4d-6a8a-4738-9036-7b51d02e1eaf" }); migrationBuilder.UpdateData( table: "AspNetUsers", keyColumn: "Id", keyValue: 2, columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, values: new object[] { "b529f4f9-3426-4a74-b048-d8995fe3e647", "AQAAAAIAAYagAAAAEIEYpwwMbS9j2l6V3fpUQONaKxCMJN3pV8rVeN3eo0iva0Bu9Jj1NIdkS4GnzvpDVw==", "065ee938-093c-4816-ad28-f2e0831a7550" }); } } }