54 lines
1.9 KiB
C#
54 lines
1.9 KiB
C#
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace DatabaseImplements.Migrations
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
public partial class InitialCreate : Migration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "Deliverys",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<int>(type: "int", nullable: false)
|
|||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|||
|
CourierFIO = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|||
|
Phone = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|||
|
Image = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|||
|
Type = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_Deliverys", x => x.Id);
|
|||
|
});
|
|||
|
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "Types",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<int>(type: "int", nullable: false)
|
|||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|||
|
PostType = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_Types", x => x.Id);
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "Deliverys");
|
|||
|
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "Types");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|