PIbd-31_Malafeev.L.S._COP_25/Cop_25/DatabaseImplement/Migrations/20241105214035_abobau.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
{
2024-11-06 02:29:24 +04:00
public partial class abobau : Migration
2024-11-05 22:04:24 +04:00
{
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");
}
}
}