elliebot/src/EllieBot/Migrations/PostgreSql/20250114060020_fishes.cs
2025-01-14 19:03:59 +13:00

39 lines
1.5 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace EllieBot.Migrations.PostgreSql
{
/// <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("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
userid = table.Column<decimal>(type: "numeric(20,0)", 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");
}
}
}