begin: PHI Column Encryption

This commit is contained in:
voltsrage
2026-06-22 21:18:36 +08:00
parent 518cc5b99a
commit 46db694820
21 changed files with 3177 additions and 6 deletions
@@ -0,0 +1,55 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace VigilCareClinicalAPI.Migrations
{
/// <inheritdoc />
public partial class AddPatientNameSearchToken : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "date_of_birth",
table: "patients",
type: "text",
nullable: false,
oldClrType: typeof(DateOnly),
oldType: "date");
migrationBuilder.AddColumn<string>(
name: "name_search_token",
table: "patients",
type: "character varying(64)",
maxLength: 64,
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_patients_name_search_token",
table: "patients",
column: "name_search_token");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_patients_name_search_token",
table: "patients");
migrationBuilder.DropColumn(
name: "name_search_token",
table: "patients");
migrationBuilder.AlterColumn<DateOnly>(
name: "date_of_birth",
table: "patients",
type: "date",
nullable: false,
oldClrType: typeof(string),
oldType: "text");
}
}
}