|
|
@ -4,7 +4,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
|
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
|
|
|
|
|
|
|
|
|
|
namespace StubbedContextLib.Migrations
|
|
|
|
namespace DbContextLib.Migrations
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/// <inheritdoc />
|
|
|
|
/// <inheritdoc />
|
|
|
|
public partial class mrg1 : Migration
|
|
|
|
public partial class mrg1 : Migration
|
|
|
@ -48,7 +48,7 @@ namespace StubbedContextLib.Migrations
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
name: "ArticleUserEntity",
|
|
|
|
name: "ArticleUserSet",
|
|
|
|
columns: table => new
|
|
|
|
columns: table => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
UserEntityId = table.Column<long>(type: "INTEGER", nullable: false),
|
|
|
|
UserEntityId = table.Column<long>(type: "INTEGER", nullable: false),
|
|
|
@ -56,15 +56,15 @@ namespace StubbedContextLib.Migrations
|
|
|
|
},
|
|
|
|
},
|
|
|
|
constraints: table =>
|
|
|
|
constraints: table =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
table.PrimaryKey("PK_ArticleUserEntity", x => new { x.ArticleEntityId, x.UserEntityId });
|
|
|
|
table.PrimaryKey("PK_ArticleUserSet", x => new { x.ArticleEntityId, x.UserEntityId });
|
|
|
|
table.ForeignKey(
|
|
|
|
table.ForeignKey(
|
|
|
|
name: "FK_ArticleUserEntity_ArticleSet_ArticleEntityId",
|
|
|
|
name: "FK_ArticleUserSet_ArticleSet_ArticleEntityId",
|
|
|
|
column: x => x.ArticleEntityId,
|
|
|
|
column: x => x.ArticleEntityId,
|
|
|
|
principalTable: "ArticleSet",
|
|
|
|
principalTable: "ArticleSet",
|
|
|
|
principalColumn: "Id",
|
|
|
|
principalColumn: "Id",
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
table.ForeignKey(
|
|
|
|
table.ForeignKey(
|
|
|
|
name: "FK_ArticleUserEntity_UserSet_UserEntityId",
|
|
|
|
name: "FK_ArticleUserSet_UserSet_UserEntityId",
|
|
|
|
column: x => x.UserEntityId,
|
|
|
|
column: x => x.UserEntityId,
|
|
|
|
principalTable: "UserSet",
|
|
|
|
principalTable: "UserSet",
|
|
|
|
principalColumn: "Id",
|
|
|
|
principalColumn: "Id",
|
|
|
@ -111,11 +111,13 @@ namespace StubbedContextLib.Migrations
|
|
|
|
{
|
|
|
|
{
|
|
|
|
{ 1L, "tony@gmail.com", "1234", "Fages", "Tony", "TonyF", "Admin" },
|
|
|
|
{ 1L, "tony@gmail.com", "1234", "Fages", "Tony", "TonyF", "Admin" },
|
|
|
|
{ 2L, "tom@mail.com", "1234", "Smith", "Tom", "TomS", "User" },
|
|
|
|
{ 2L, "tom@mail.com", "1234", "Smith", "Tom", "TomS", "User" },
|
|
|
|
{ 3L, "M&M#mail.com", "1234", "M&M's", "Red", "RedM", "Modérator" }
|
|
|
|
{ 3L, "M&M#mail.com", "1234", "M&M's", "Red", "RedM", "Modérator" },
|
|
|
|
|
|
|
|
{ 4L, "ShaCasca@gmail.com", "1234", "Cascarra", "Cascarra", "Sha", "Admin" },
|
|
|
|
|
|
|
|
{ 5L, "", "1234", "Sillard", "Noa", "NoaSil", "Admin" }
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.InsertData(
|
|
|
|
migrationBuilder.InsertData(
|
|
|
|
table: "ArticleUserEntity",
|
|
|
|
table: "ArticleUserSet",
|
|
|
|
columns: new[] { "ArticleEntityId", "UserEntityId" },
|
|
|
|
columns: new[] { "ArticleEntityId", "UserEntityId" },
|
|
|
|
values: new object[,]
|
|
|
|
values: new object[,]
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -126,9 +128,19 @@ namespace StubbedContextLib.Migrations
|
|
|
|
{ 3L, 3L }
|
|
|
|
{ 3L, 3L }
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.InsertData(
|
|
|
|
|
|
|
|
table: "FormSet",
|
|
|
|
|
|
|
|
columns: new[] { "Id", "DatePublication", "Link", "Pseudo", "Theme", "UserEntityId" },
|
|
|
|
|
|
|
|
values: new object[,]
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
{ 1L, "Form 1 Description", "hhtp://form1.com", "Form 1", "", 1L },
|
|
|
|
|
|
|
|
{ 2L, "Form 2 Description", "hhtp://form2.com", "Form 2", "", 2L },
|
|
|
|
|
|
|
|
{ 3L, "Form 3 Description", "hhtp://form3.com", "Form 3", "", 3L }
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
name: "IX_ArticleUserEntity_UserEntityId",
|
|
|
|
name: "IX_ArticleUserSet_UserEntityId",
|
|
|
|
table: "ArticleUserEntity",
|
|
|
|
table: "ArticleUserSet",
|
|
|
|
column: "UserEntityId");
|
|
|
|
column: "UserEntityId");
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
@ -141,7 +153,7 @@ namespace StubbedContextLib.Migrations
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
name: "ArticleUserEntity");
|
|
|
|
name: "ArticleUserSet");
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
name: "FormSet");
|
|
|
|
name: "FormSet");
|