using Microsoft.EntityFrameworkCore.Migrations; #nullable disable #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional namespace Elements.Data.Migrations { /// public partial class Addinitialdata : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Suggestion_Elements_FirstIngredientId", table: "Suggestion"); migrationBuilder.DropForeignKey( name: "FK_Suggestion_Elements_SecondIngredientId", table: "Suggestion"); migrationBuilder.DropForeignKey( name: "FK_Suggestion_Users_UserId", table: "Suggestion"); migrationBuilder.DropPrimaryKey( name: "PK_Suggestion", table: "Suggestion"); migrationBuilder.RenameTable( name: "Suggestion", newName: "Suggestions"); migrationBuilder.RenameIndex( name: "IX_Suggestion_UserId", table: "Suggestions", newName: "IX_Suggestions_UserId"); migrationBuilder.RenameIndex( name: "IX_Suggestion_SecondIngredientId", table: "Suggestions", newName: "IX_Suggestions_SecondIngredientId"); migrationBuilder.RenameIndex( name: "IX_Suggestion_FirstIngredientId", table: "Suggestions", newName: "IX_Suggestions_FirstIngredientId"); migrationBuilder.AddPrimaryKey( name: "PK_Suggestions", table: "Suggestions", column: "Id"); migrationBuilder.CreateTable( name: "Recipes", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), FirstIngredientId = table.Column(type: "INTEGER", nullable: false), SecondIngredientId = table.Column(type: "INTEGER", nullable: false), ResultId = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Recipes", x => x.Id); table.ForeignKey( name: "FK_Recipes_Elements_FirstIngredientId", column: x => x.FirstIngredientId, principalTable: "Elements", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_Recipes_Elements_ResultId", column: x => x.ResultId, principalTable: "Elements", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_Recipes_Elements_SecondIngredientId", column: x => x.SecondIngredientId, principalTable: "Elements", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.InsertData( table: "Users", columns: new[] { "Id", "GoogleId", "Name" }, values: new object[] { 1, "", "Elements" }); migrationBuilder.InsertData( table: "Elements", columns: new[] { "Id", "IconBitmap", "Name", "State", "UserId" }, values: new object[,] { { 1, "/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w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/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/yGW/f8hlv3/IZb9/w==", "Water", 1, 1 }, { 3, "u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/7ve+/+73vv/u977/w==", "Air", 1, 1 }, { 4, "XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/11AN/9dQDf/XUA3/w==", "Ground", 1, 1 } }); migrationBuilder.CreateIndex( name: "IX_Recipes_FirstIngredientId", table: "Recipes", column: "FirstIngredientId"); migrationBuilder.CreateIndex( name: "IX_Recipes_ResultId", table: "Recipes", column: "ResultId"); migrationBuilder.CreateIndex( name: "IX_Recipes_SecondIngredientId", table: "Recipes", column: "SecondIngredientId"); migrationBuilder.AddForeignKey( name: "FK_Suggestions_Elements_FirstIngredientId", table: "Suggestions", column: "FirstIngredientId", principalTable: "Elements", principalColumn: "Id", onDelete: ReferentialAction.Cascade); migrationBuilder.AddForeignKey( name: "FK_Suggestions_Elements_SecondIngredientId", table: "Suggestions", column: "SecondIngredientId", principalTable: "Elements", principalColumn: "Id", onDelete: ReferentialAction.Cascade); migrationBuilder.AddForeignKey( name: "FK_Suggestions_Users_UserId", table: "Suggestions", column: "UserId", principalTable: "Users", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Suggestions_Elements_FirstIngredientId", table: "Suggestions"); migrationBuilder.DropForeignKey( name: "FK_Suggestions_Elements_SecondIngredientId", table: "Suggestions"); migrationBuilder.DropForeignKey( name: "FK_Suggestions_Users_UserId", table: "Suggestions"); migrationBuilder.DropTable( name: "Recipes"); migrationBuilder.DropPrimaryKey( name: "PK_Suggestions", table: "Suggestions"); migrationBuilder.DeleteData( table: "Elements", keyColumn: "Id", keyValue: 1); migrationBuilder.DeleteData( table: "Elements", keyColumn: "Id", keyValue: 2); migrationBuilder.DeleteData( table: "Elements", keyColumn: "Id", keyValue: 3); migrationBuilder.DeleteData( table: "Elements", keyColumn: "Id", keyValue: 4); migrationBuilder.DeleteData( table: "Users", keyColumn: "Id", keyValue: 1); migrationBuilder.RenameTable( name: "Suggestions", newName: "Suggestion"); migrationBuilder.RenameIndex( name: "IX_Suggestions_UserId", table: "Suggestion", newName: "IX_Suggestion_UserId"); migrationBuilder.RenameIndex( name: "IX_Suggestions_SecondIngredientId", table: "Suggestion", newName: "IX_Suggestion_SecondIngredientId"); migrationBuilder.RenameIndex( name: "IX_Suggestions_FirstIngredientId", table: "Suggestion", newName: "IX_Suggestion_FirstIngredientId"); migrationBuilder.AddPrimaryKey( name: "PK_Suggestion", table: "Suggestion", column: "Id"); migrationBuilder.AddForeignKey( name: "FK_Suggestion_Elements_FirstIngredientId", table: "Suggestion", column: "FirstIngredientId", principalTable: "Elements", principalColumn: "Id", onDelete: ReferentialAction.Cascade); migrationBuilder.AddForeignKey( name: "FK_Suggestion_Elements_SecondIngredientId", table: "Suggestion", column: "SecondIngredientId", principalTable: "Elements", principalColumn: "Id", onDelete: ReferentialAction.Cascade); migrationBuilder.AddForeignKey( name: "FK_Suggestion_Users_UserId", table: "Suggestion", column: "UserId", principalTable: "Users", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } } }