Files
HealthAppRepository/src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.cs
T

39 lines
1.4 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PatientProfileService.Persistence.Migrations
{
/// <inheritdoc />
public partial class InitialPatientSchema : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "patient",
columns: table => new
{
patient_id = table.Column<Guid>(type: "uuid", nullable: false),
name = table.Column<string>(type: "character varying", nullable: false),
date_of_birth = table.Column<DateOnly>(type: "date", nullable: false),
contact_info = table.Column<string>(type: "character varying", nullable: true),
created_at = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
updated_at = table.Column<DateTime>(type: "timestamp without time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_patient", x => x.patient_id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "patient");
}
}
}