using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Back.Migrations { /// public partial class warehousenew1 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Receipts", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), CODID = table.Column(type: "int", nullable: false), Count = table.Column(type: "int", nullable: false), Date = table.Column(type: "nvarchar(max)", nullable: false), ForSale = table.Column(type: "bit", nullable: false), Type = table.Column(type: "int", nullable: false), info = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Receipts", x => x.ID); table.ForeignKey( name: "FK_Receipts_CODItems_CODID", column: x => x.CODID, principalTable: "CODItems", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "Remittances", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), CODID = table.Column(type: "int", nullable: false), Count = table.Column(type: "int", nullable: false), Date = table.Column(type: "nvarchar(max)", nullable: false), Type = table.Column(type: "int", nullable: false), info = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Remittances", x => x.ID); table.ForeignKey( name: "FK_Remittances_CODItems_CODID", column: x => x.CODID, principalTable: "CODItems", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_Receipts_CODID", table: "Receipts", column: "CODID"); migrationBuilder.CreateIndex( name: "IX_Remittances_CODID", table: "Remittances", column: "CODID"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Receipts"); migrationBuilder.DropTable( name: "Remittances"); } } }