using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace UserSvc.Data.Migrations { /// public partial class InitalCreate : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Users", columns: table => new { Id = table.Column(type: "text", nullable: false), Name = table.Column(type: "text", nullable: false), Surname = table.Column(type: "text", nullable: false), Age = table.Column(type: "integer", nullable: false), Weight = table.Column(type: "real", nullable: false), Height = table.Column(type: "real", nullable: false), Sexe = table.Column(type: "boolean", nullable: false), ProfilePict = table.Column(type: "text", nullable: false), NbSessionWeek = table.Column(type: "integer", nullable: false), Goal = table.Column(type: "integer", nullable: false), SleepLevel = table.Column(type: "integer", nullable: false), SportLevel = table.Column(type: "integer", nullable: false), Sports = table.Column(type: "integer[]", nullable: false), HealthProblems = table.Column(type: "integer[]", nullable: false), Program = table.Column(type: "text", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(type: "timestamp with time zone", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Users", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_Users_Name_Surname", table: "Users", columns: new[] { "Name", "Surname" }, unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Users"); } } }