49 lines
1.7 KiB
C#
49 lines
1.7 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|