38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace EllieBot.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class fishes : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "FishCatch",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
UserId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
|
FishId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
Count = table.Column<int>(type: "INTEGER", nullable: false),
|
|
MaxStars = table.Column<int>(type: "INTEGER", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_FishCatch", x => x.Id);
|
|
table.UniqueConstraint("AK_FishCatch_UserId_FishId", x => new { x.UserId, x.FishId });
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "FishCatch");
|
|
}
|
|
}
|
|
}
|