修改阅片期编辑
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
19b647fb4a
commit
f1fadebfba
|
@ -605,7 +605,7 @@ namespace IRaCIS.Application.Services
|
|||
//只有阅片期有
|
||||
CutOffVisitId = rm.SubjectVisit.Id,
|
||||
CutOffVisitName = rm.SubjectVisit.VisitName,
|
||||
ReadingSetType = null,
|
||||
ReadingSetType = rm.ReadingSetType,
|
||||
|
||||
//之前视图返回的null 应该是没用的?
|
||||
ReadModuleId = rm.Id,
|
||||
|
|
|
@ -35,8 +35,9 @@ public partial class IRCContext : DbContext
|
|||
public virtual DbSet<ProjectUser2> ProjectUser2 { get; set; }
|
||||
|
||||
public virtual DbSet<TestFieldName> TestFieldName { get; set; }
|
||||
|
||||
|
||||
public virtual DbSet<TestComment> TestComment { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
// 替换默认的 MigrationsSqlGenerator
|
||||
|
|
254
IRaCIS.Core.Test/CodeFirstTest/MSSQL/Migrations/20240918010002_Comment.Designer.cs
generated
Normal file
254
IRaCIS.Core.Test/CodeFirstTest/MSSQL/Migrations/20240918010002_Comment.Designer.cs
generated
Normal file
|
@ -0,0 +1,254 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using IRaCIS.Core.Test.CodeFirstTest.MSSQL;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
|
||||
{
|
||||
[DbContext(typeof(IRCContext))]
|
||||
[Migration("20240918010002_Comment")]
|
||||
partial class Comment
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.8")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Project", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ProjectUser", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Name2")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<Guid>("ProjectId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("ProjectUser");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ProjectUser2", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("ProjectId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("ProjectUser2");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestComment", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)")
|
||||
.HasComment("这是字段备注Code");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)")
|
||||
.HasComment("这是字段备注Name");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("TestComment", t =>
|
||||
{
|
||||
t.HasComment("这是类备注");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestFieldName", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("NAME1")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("NAme2")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("naMe3")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("TestFieldName");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestStr", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("DefineLength")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<string>("DefualtLength")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("MaxLength")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("TestStr");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ProjectUser", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Project", "Project")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProjectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ProjectUser2", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Project", "Project")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProjectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Comment : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TestComment",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Code = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false, comment: "这是字段备注Code"),
|
||||
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false, comment: "这是字段备注Name"),
|
||||
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TestComment", x => x.Id);
|
||||
},
|
||||
comment: "这是类备注");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "TestComment");
|
||||
}
|
||||
}
|
||||
}
|
253
IRaCIS.Core.Test/CodeFirstTest/MSSQL/Migrations/20240918010449_CommentModify.Designer.cs
generated
Normal file
253
IRaCIS.Core.Test/CodeFirstTest/MSSQL/Migrations/20240918010449_CommentModify.Designer.cs
generated
Normal file
|
@ -0,0 +1,253 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using IRaCIS.Core.Test.CodeFirstTest.MSSQL;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
|
||||
{
|
||||
[DbContext(typeof(IRCContext))]
|
||||
[Migration("20240918010449_CommentModify")]
|
||||
partial class CommentModify
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.8")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Project", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ProjectUser", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Name2")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<Guid>("ProjectId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("ProjectUser");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ProjectUser2", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("ProjectId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("ProjectUser2");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestComment", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)")
|
||||
.HasComment("这是字段备注Name的修改");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("TestComment", t =>
|
||||
{
|
||||
t.HasComment("这是类备注的修改");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestFieldName", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("NAME1")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("NAme2")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("naMe3")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("TestFieldName");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestStr", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("DefineLength")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<string>("DefualtLength")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("MaxLength")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("TestStr");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ProjectUser", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Project", "Project")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProjectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ProjectUser2", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Project", "Project")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProjectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class CommentModify : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterTable(
|
||||
name: "TestComment",
|
||||
comment: "这是类备注的修改",
|
||||
oldComment: "这是类备注");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "TestComment",
|
||||
type: "nvarchar(200)",
|
||||
maxLength: 200,
|
||||
nullable: false,
|
||||
comment: "这是字段备注Name的修改",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(200)",
|
||||
oldMaxLength: 200,
|
||||
oldComment: "这是字段备注Name");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Code",
|
||||
table: "TestComment",
|
||||
type: "nvarchar(200)",
|
||||
maxLength: 200,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(200)",
|
||||
oldMaxLength: 200,
|
||||
oldComment: "这是字段备注Code");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterTable(
|
||||
name: "TestComment",
|
||||
comment: "这是类备注",
|
||||
oldComment: "这是类备注的修改");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "TestComment",
|
||||
type: "nvarchar(200)",
|
||||
maxLength: 200,
|
||||
nullable: false,
|
||||
comment: "这是字段备注Name",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(200)",
|
||||
oldMaxLength: 200,
|
||||
oldComment: "这是字段备注Name的修改");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Code",
|
||||
table: "TestComment",
|
||||
type: "nvarchar(200)",
|
||||
maxLength: 200,
|
||||
nullable: false,
|
||||
comment: "这是字段备注Code",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(200)",
|
||||
oldMaxLength: 200);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -111,6 +111,43 @@ namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
|
|||
b.ToTable("ProjectUser2");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestComment", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)")
|
||||
.HasComment("这是字段备注Name的修改");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("TestComment", t =>
|
||||
{
|
||||
t.HasComment("这是类备注的修改");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestFieldName", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
@ -207,4 +208,16 @@ namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL
|
|||
public string naMe3 { get; set; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 测试备注迁移 以及修改备注迁移
|
||||
|
||||
[Comment("这是类备注的修改")]
|
||||
public class TestComment: BaseFullAuditEntity
|
||||
{
|
||||
public string Code { get; set; }
|
||||
|
||||
[Comment("这是字段备注Name的修改")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue