62 lines
1.8 KiB
C#
62 lines
1.8 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace VigilCareClinicalAPI.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddPatientClinicalDemographics : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "allergies",
|
|
table: "patients",
|
|
type: "text",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "blood_type",
|
|
table: "patients",
|
|
type: "character varying(5)",
|
|
maxLength: 5,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "emergency_contact_name",
|
|
table: "patients",
|
|
type: "character varying(200)",
|
|
maxLength: 200,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "emergency_contact_phone",
|
|
table: "patients",
|
|
type: "character varying(20)",
|
|
maxLength: 20,
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "allergies",
|
|
table: "patients");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "blood_type",
|
|
table: "patients");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "emergency_contact_name",
|
|
table: "patients");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "emergency_contact_phone",
|
|
table: "patients");
|
|
}
|
|
}
|
|
}
|