using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace NadekoBot.Migrations.PostgreSql { /// public partial class fishes : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "fishcatch", columns: table => new { id = table.Column(type: "integer", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), userid = table.Column(type: "numeric(20,0)", nullable: false), fishid = table.Column(type: "integer", nullable: false), count = table.Column(type: "integer", nullable: false), maxstars = table.Column(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 }); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "fishcatch"); } } }