using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
///
public partial class SiteSurveyEquipmentModify : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn(
name: "ScannerType",
table: "TrialSiteEquipmentSurvey",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
comment: "扫描设备型号",
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400);
migrationBuilder.AlterColumn(
name: "Parameters",
table: "TrialSiteEquipmentSurvey",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
comment: "扫描设备参数",
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400);
migrationBuilder.AlterColumn(
name: "ManufacturerName",
table: "TrialSiteEquipmentSurvey",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
comment: "扫描设备厂商其他补充",
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400);
migrationBuilder.AlterColumn(
name: "EquipmentTypeId",
table: "TrialSiteEquipmentSurvey",
type: "uniqueidentifier",
nullable: false,
comment: "扫描设备-废弃",
oldClrType: typeof(Guid),
oldType: "uniqueidentifier");
migrationBuilder.AddColumn(
name: "BodyCoilChannelCount",
table: "TrialSiteEquipmentSurvey",
type: "int",
nullable: false,
defaultValue: 0,
comment: "体部线圈通道数 (≥16 或 <16)");
migrationBuilder.AddColumn(
name: "CanFullyExportPdfParameterMapsAndRawDicom",
table: "TrialSiteEquipmentSurvey",
type: "bit",
nullable: false,
defaultValue: false,
comment: "是否可完整导出 PDFF 参数图及全部原始 DICOM 数据");
migrationBuilder.AddColumn(
name: "EquipmentTypeEnum",
table: "TrialSiteEquipmentSurvey",
type: "int",
nullable: false,
defaultValue: 0,
comment: "扫描设备-New");
migrationBuilder.AddColumn(
name: "HasDedicatedPdfFatQuantificationSequence",
table: "TrialSiteEquipmentSurvey",
type: "bit",
nullable: false,
defaultValue: false,
comment: "是否具备专用的PDFF脂肪定量序列(CSE-MRI序列)");
migrationBuilder.AddColumn(
name: "HasT2R2Correction",
table: "TrialSiteEquipmentSurvey",
type: "bit",
nullable: false,
defaultValue: false,
comment: "是否包含 T2/R2 校正(用于铁沉积校正)");
migrationBuilder.AddColumn(
name: "MagneticFieldStrengthType",
table: "TrialSiteEquipmentSurvey",
type: "int",
nullable: false,
defaultValue: 0,
comment: "磁场强度 (1.5T / 3.0T)");
migrationBuilder.AddColumn(
name: "ManufacturerType",
table: "TrialSiteEquipmentSurvey",
type: "int",
nullable: false,
defaultValue: 0,
comment: "扫描设备厂商");
migrationBuilder.AddColumn(
name: "OtherEquipmentType",
table: "TrialSiteEquipmentSurvey",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn(
name: "OtherSequenceSpecification",
table: "TrialSiteEquipmentSurvey",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "",
comment: "其他序列详细说明 (当 PdfFatQuantificationSequenceType = Other 时建议填写)");
migrationBuilder.AddColumn(
name: "PdfFatQuantificationSequenceType",
table: "TrialSiteEquipmentSurvey",
type: "int",
nullable: true,
comment: "专用的PDFF脂肪定量序列类型 (当 HasDedicatedPdfFatQuantificationSequence = true 时有效)");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "BodyCoilChannelCount",
table: "TrialSiteEquipmentSurvey");
migrationBuilder.DropColumn(
name: "CanFullyExportPdfParameterMapsAndRawDicom",
table: "TrialSiteEquipmentSurvey");
migrationBuilder.DropColumn(
name: "EquipmentTypeEnum",
table: "TrialSiteEquipmentSurvey");
migrationBuilder.DropColumn(
name: "HasDedicatedPdfFatQuantificationSequence",
table: "TrialSiteEquipmentSurvey");
migrationBuilder.DropColumn(
name: "HasT2R2Correction",
table: "TrialSiteEquipmentSurvey");
migrationBuilder.DropColumn(
name: "MagneticFieldStrengthType",
table: "TrialSiteEquipmentSurvey");
migrationBuilder.DropColumn(
name: "ManufacturerType",
table: "TrialSiteEquipmentSurvey");
migrationBuilder.DropColumn(
name: "OtherEquipmentType",
table: "TrialSiteEquipmentSurvey");
migrationBuilder.DropColumn(
name: "OtherSequenceSpecification",
table: "TrialSiteEquipmentSurvey");
migrationBuilder.DropColumn(
name: "PdfFatQuantificationSequenceType",
table: "TrialSiteEquipmentSurvey");
migrationBuilder.AlterColumn(
name: "ScannerType",
table: "TrialSiteEquipmentSurvey",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400,
oldComment: "扫描设备型号");
migrationBuilder.AlterColumn(
name: "Parameters",
table: "TrialSiteEquipmentSurvey",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400,
oldComment: "扫描设备参数");
migrationBuilder.AlterColumn(
name: "ManufacturerName",
table: "TrialSiteEquipmentSurvey",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400,
oldComment: "扫描设备厂商其他补充");
migrationBuilder.AlterColumn(
name: "EquipmentTypeId",
table: "TrialSiteEquipmentSurvey",
type: "uniqueidentifier",
nullable: false,
oldClrType: typeof(Guid),
oldType: "uniqueidentifier",
oldComment: "扫描设备-废弃");
}
}
}