using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace BackendPIA.Migrations { /// public partial class AddRaffle : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Raffles", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), Winners = table.Column(type: "integer", nullable: false), IsClosed = table.Column(type: "boolean", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Raffles", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Raffles"); } } }