feature: PHI Column Encryption + Access Logging

This commit is contained in:
voltsrage
2026-06-22 23:43:48 +08:00
parent 46db694820
commit 1824e4eef1
15 changed files with 1832 additions and 11 deletions
@@ -0,0 +1,102 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace VigilCareClinicalAPI.Migrations
{
/// <inheritdoc />
public partial class WidenPhiEncryptedColumns : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "last_name",
table: "patients",
type: "text",
maxLength: 100,
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(100)",
oldMaxLength: 100);
migrationBuilder.AlterColumn<string>(
name: "first_name",
table: "patients",
type: "text",
maxLength: 100,
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(100)",
oldMaxLength: 100);
migrationBuilder.AlterColumn<string>(
name: "emergency_contact_phone",
table: "patients",
type: "text",
maxLength: 20,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(20)",
oldMaxLength: 20,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "emergency_contact_name",
table: "patients",
type: "text",
maxLength: 200,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(200)",
oldMaxLength: 200,
oldNullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "last_name",
table: "patients",
type: "character varying(100)",
maxLength: 100,
nullable: false,
oldClrType: typeof(string),
oldType: "text",
oldMaxLength: 100);
migrationBuilder.AlterColumn<string>(
name: "first_name",
table: "patients",
type: "character varying(100)",
maxLength: 100,
nullable: false,
oldClrType: typeof(string),
oldType: "text",
oldMaxLength: 100);
migrationBuilder.AlterColumn<string>(
name: "emergency_contact_phone",
table: "patients",
type: "character varying(20)",
maxLength: 20,
nullable: true,
oldClrType: typeof(string),
oldType: "text",
oldMaxLength: 20,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "emergency_contact_name",
table: "patients",
type: "character varying(200)",
maxLength: 200,
nullable: true,
oldClrType: typeof(string),
oldType: "text",
oldMaxLength: 200,
oldNullable: true);
}
}
}