using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; namespace Kehyeedra3.Migrations { public partial class Beatlefish : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "BattleFishObject", columns: table => new { FishId = table.Column(nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), FishType = table.Column(nullable: false), Xp = table.Column(nullable: false), NextXp = table.Column(nullable: false), Lvl = table.Column(nullable: false), Name = table.Column(nullable: true), UserId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_BattleFishObject", x => x.FishId); table.ForeignKey( name: "FK_BattleFishObject_Users_UserId", column: x => x.UserId, principalTable: "Users", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_BattleFishObject_UserId", table: "BattleFishObject", column: "UserId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "BattleFishObject"); } } }