123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using Microsoft.EntityFrameworkCore.Metadata;
- using Microsoft.EntityFrameworkCore.Migrations;
-
- namespace ProRestaurant.Migrations
- {
- public partial class _002 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn<string>(
- name: "Categories",
- table: "Restaurants",
- nullable: true);
-
- migrationBuilder.AddColumn<string>(
- name: "DeliveryTime",
- table: "Restaurants",
- nullable: true);
-
- migrationBuilder.CreateTable(
- name: "RestaurantCategories",
- columns: table => new
- {
- Id = table.Column<int>(nullable: false)
- .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
- Description = table.Column<string>(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");
- }
- }
- }
|