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