PIbd31.Lyovushkina_COP32_2/WinFormUchetLab/UchetLabDatabaseImplement/Migrations/20241006183154_InitialCreate.cs

55 lines
1.9 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace UchetLabDatabaseImplement.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Checker",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
FIO = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Checker", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Labs",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
LabTask = table.Column<string>(type: "nvarchar(max)", nullable: false),
TaskImage = table.Column<string>(type: "nvarchar(max)", nullable: false),
Checker = table.Column<string>(type: "nvarchar(max)", nullable: false),
CheckDate = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Labs", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Checker");
migrationBuilder.DropTable(
name: "Labs");
}
}
}