using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace QuotifyBE.Migrations { /// public partial class sitewide_statistics : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Statistics", columns: table => new { Id = table.Column(type: "integer", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), Label = table.Column(type: "text", nullable: false), IValue = table.Column(type: "integer", nullable: true), SValue = table.Column(type: "text", nullable: true) }, constraints: table => { table.PrimaryKey("PK_Statistics", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_Statistics_Label", table: "Statistics", column: "Label", unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Statistics"); } } }