|
|
@ -5,7 +5,7 @@
|
|
|
|
namespace EntityFramwork.Migrations
|
|
|
|
namespace EntityFramwork.Migrations
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/// <inheritdoc />
|
|
|
|
/// <inheritdoc />
|
|
|
|
public partial class testMigra : Migration
|
|
|
|
public partial class test : Migration
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/// <inheritdoc />
|
|
|
|
/// <inheritdoc />
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
@ -25,6 +25,19 @@ namespace EntityFramwork.Migrations
|
|
|
|
table.PrimaryKey("PK_Champions", x => x.Id);
|
|
|
|
table.PrimaryKey("PK_Champions", x => x.Id);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
|
|
|
name: "Images",
|
|
|
|
|
|
|
|
columns: table => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Id = table.Column<long>(type: "INTEGER", nullable: false)
|
|
|
|
|
|
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
|
|
|
|
|
|
Base64 = table.Column<string>(type: "TEXT", nullable: false)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
constraints: table =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
table.PrimaryKey("PK_Images", x => x.Id);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
name: "Skins",
|
|
|
|
name: "Skins",
|
|
|
|
columns: table => new
|
|
|
|
columns: table => new
|
|
|
@ -47,6 +60,12 @@ namespace EntityFramwork.Migrations
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
|
|
|
|
name: "IX_Champions_Name",
|
|
|
|
|
|
|
|
table: "Champions",
|
|
|
|
|
|
|
|
column: "Name",
|
|
|
|
|
|
|
|
unique: true);
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
name: "IX_Skins_ChampionId",
|
|
|
|
name: "IX_Skins_ChampionId",
|
|
|
|
table: "Skins",
|
|
|
|
table: "Skins",
|
|
|
@ -56,6 +75,9 @@ namespace EntityFramwork.Migrations
|
|
|
|
/// <inheritdoc />
|
|
|
|
/// <inheritdoc />
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
|
|
|
name: "Images");
|
|
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
name: "Skins");
|
|
|
|
name: "Skins");
|
|
|
|
|
|
|
|
|