using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace QuickCHAT.Migrations { public partial class CreateUsers : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Users", columns: table => new { UserID = table.Column(nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn), Username = table.Column(nullable: false), Password = table.Column(nullable: true), First = table.Column(nullable: true), Last = table.Column(nullable: true), Description = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_Users", x => x.UserID); table.UniqueConstraint("AK_Username", x => x.Username); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Users"); } } }