Övergått till entity framework + lagt till ny tabell
This commit is contained in:
@ -0,0 +1,48 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace GreadyPoang.DataLayer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class initialCreate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Participants",
|
||||
columns: table => new
|
||||
{
|
||||
ParticipantId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
FirstName = table.Column<string>(type: "TEXT", nullable: false),
|
||||
LastName = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Email = table.Column<string>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Participants", x => x.ParticipantId);
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Participants",
|
||||
columns: new[] { "ParticipantId", "Email", "FirstName", "LastName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 1, "John.Doe@gmail.com", "John", "Doe" },
|
||||
{ 2, "jb@gmail.com", "Jane", "Black" },
|
||||
{ 3, "mw@gmail.com", "Mary", "White" }
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Participants");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user