PIbd-31_Malafeev.L.S._COP_25/Cop_25/DatabaseImplement/Migrations/20241104155629_abobus.cs

52 lines
1.9 KiB
C#
Raw Normal View History

2024-11-05 22:04:24 +04:00
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DatabaseImplement.Migrations
{
public partial class abobus : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Deliverys",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
FCs = table.Column<string>(type: "text", nullable: false),
DeliveryType = table.Column<string>(type: "text", nullable: false),
Wishes = table.Column<string>(type: "text", nullable: false),
DeliveryDate = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Deliverys", x => x.Id);
});
migrationBuilder.CreateTable(
name: "DeliveryTypes",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DeliveryTypes", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Deliverys");
migrationBuilder.DropTable(
name: "DeliveryTypes");
}
}
}