using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; namespace ProRestaurant.Migrations { public partial class _002 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "Categories", table: "Restaurants", nullable: true); migrationBuilder.AddColumn( name: "DeliveryTime", table: "Restaurants", nullable: true); migrationBuilder.CreateTable( name: "RestaurantCategories", columns: table => new { Id = table.Column(nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), Description = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_RestaurantCategories", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "RestaurantCategories"); migrationBuilder.DropColumn( name: "Categories", table: "Restaurants"); migrationBuilder.DropColumn( name: "DeliveryTime", table: "Restaurants"); } } }