using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace CompanyManagment.EFCore.Migrations { /// public partial class adddynamicdeductiontocustomizecheckouts : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "CustomizeCheckouts_CheckoutDynamicDeductions", columns: table => new { CustomizeCheckoutid = table.Column(type: "bigint", nullable: false), Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), Count = table.Column(type: "int", nullable: false), Amount = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: true) }, constraints: table => { table.PrimaryKey("PK_CustomizeCheckouts_CheckoutDynamicDeductions", x => new { x.CustomizeCheckoutid, x.Id }); table.ForeignKey( name: "FK_CustomizeCheckouts_CheckoutDynamicDeductions_CustomizeCheckouts_CustomizeCheckoutid", column: x => x.CustomizeCheckoutid, principalTable: "CustomizeCheckouts", principalColumn: "id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "CustomizeCheckoutTemps_CheckoutDynamicDeductions", columns: table => new { CustomizeCheckoutTempid = table.Column(type: "bigint", nullable: false), Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), Count = table.Column(type: "int", nullable: false), Amount = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: true) }, constraints: table => { table.PrimaryKey("PK_CustomizeCheckoutTemps_CheckoutDynamicDeductions", x => new { x.CustomizeCheckoutTempid, x.Id }); table.ForeignKey( name: "FK_CustomizeCheckoutTemps_CheckoutDynamicDeductions_CustomizeCheckoutTemps_CustomizeCheckoutTempid", column: x => x.CustomizeCheckoutTempid, principalTable: "CustomizeCheckoutTemps", principalColumn: "id", onDelete: ReferentialAction.Cascade); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "CustomizeCheckouts_CheckoutDynamicDeductions"); migrationBuilder.DropTable( name: "CustomizeCheckoutTemps_CheckoutDynamicDeductions"); } } }