You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WebServices/src/UserSvc/Data/Migrations/20250618084336_InitalCreate.cs

56 lines
2.4 KiB

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace UserSvc.Data.Migrations
{
/// <inheritdoc />
public partial class InitalCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Id = table.Column<string>(type: "text", nullable: false),
Name = table.Column<string>(type: "text", nullable: false),
Surname = table.Column<string>(type: "text", nullable: false),
Age = table.Column<int>(type: "integer", nullable: false),
Weight = table.Column<float>(type: "real", nullable: false),
Height = table.Column<float>(type: "real", nullable: false),
Sexe = table.Column<bool>(type: "boolean", nullable: false),
ProfilePict = table.Column<string>(type: "text", nullable: false),
NbSessionWeek = table.Column<int>(type: "integer", nullable: false),
Goal = table.Column<int>(type: "integer", nullable: false),
SleepLevel = table.Column<int>(type: "integer", nullable: false),
SportLevel = table.Column<int>(type: "integer", nullable: false),
Sports = table.Column<int[]>(type: "integer[]", nullable: false),
HealthProblems = table.Column<int[]>(type: "integer[]", nullable: false),
Program = table.Column<string>(type: "text", nullable: true),
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
UpdatedAt = table.Column<DateTime>(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);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Users");
}
}
}