using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Distribution.Migrations { /// public partial class AddPaymentChequeAndEntryMode : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "ChequeDate", table: "Payments", type: "datetime(6)", nullable: true); migrationBuilder.AddColumn( name: "ChequeNumber", table: "Payments", type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "EntryMode", table: "Payments", type: "int", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "RecordedBy", table: "Payments", type: "char(36)", nullable: true, collation: "ascii_general_ci"); migrationBuilder.UpdateData( table: "Payments", keyColumn: "Id", keyValue: new Guid("47000000-0000-0000-0000-000000000001"), columns: new[] { "ChequeDate", "ChequeNumber", "EntryMode", "RecordedBy" }, values: new object[] { null, null, 0, null }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "ChequeDate", table: "Payments"); migrationBuilder.DropColumn( name: "ChequeNumber", table: "Payments"); migrationBuilder.DropColumn( name: "EntryMode", table: "Payments"); migrationBuilder.DropColumn( name: "RecordedBy", table: "Payments"); } } }