Browse Source

增加索引

master
wxd 1 year ago
parent
commit
ca094afd8e
  1. 1
      src/Shentun.Peis.Domain/RegisterCheckAsbitems/RegisterCheckAsbitem.cs
  2. 3
      src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs
  3. 15442
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240828030842_register_check_index.Designer.cs
  4. 67
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240828030842_register_check_index.cs
  5. 7
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

1
src/Shentun.Peis.Domain/RegisterCheckAsbitems/RegisterCheckAsbitem.cs

@ -13,6 +13,7 @@ namespace Shentun.Peis.Models
/// </summary>
[Table("register_check_asbitem")]
[Index(nameof(PatientRegisterId), nameof(AsbitemId), Name = "ix_register_asbitem", IsUnique = true)]
[Index(nameof(ChargeRequestId), Name = "ix_register_check_charge_request_id")]
public class RegisterCheckAsbitem : AuditedEntity<Guid>, IHasConcurrencyStamp
{
public RegisterCheckAsbitem()

3
src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs

@ -10,10 +10,11 @@ using Volo.Abp.Domain.Entities.Auditing;
namespace Shentun.Peis.Models
{
/// <summary>
/// 登记检查单
/// 登记检查单
/// </summary>
[Table("register_check")]
[Index(nameof(CheckRequestNo), Name = "ix_register_check_1")]
[Index(nameof(PatientRegisterId), Name = "ix_register_check_patient_register_id")]
public class RegisterCheck: AuditedEntity<Guid>, IHasConcurrencyStamp
{
public RegisterCheck()

15442
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240828030842_register_check_index.Designer.cs
File diff suppressed because it is too large
View File

67
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240828030842_register_check_index.cs

@ -0,0 +1,67 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class register_check_index : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<Guid>(
name: "parent_id",
table: "critical_follow_value_type",
type: "uuid",
nullable: true,
comment: "父编号",
oldClrType: typeof(Guid),
oldType: "uuid",
oldFixedLength: true,
oldComment: "父编号");
migrationBuilder.CreateIndex(
name: "ix_register_check_charge_request_id",
table: "register_check_asbitem",
column: "charge_request_id");
migrationBuilder.CreateIndex(
name: "ix_register_check_patient_register_id",
table: "register_check",
column: "patient_register_id");
migrationBuilder.CreateIndex(
name: "ix_register_check_1",
table: "register_check",
column: "check_request_no");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "ix_register_check_charge_request_id",
table: "register_check_asbitem");
migrationBuilder.DropIndex(
name: "ix_register_check_patient_register_id",
table: "register_check");
migrationBuilder.DropIndex(
name: "ix_register_check_1",
table: "register_check");
migrationBuilder.AlterColumn<Guid>(
name: "parent_id",
table: "critical_follow_value_type",
type: "uuid",
fixedLength: true,
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
comment: "父编号",
oldClrType: typeof(Guid),
oldType: "uuid",
oldNullable: true,
oldComment: "父编号");
}
}
}

7
src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

@ -2681,10 +2681,9 @@ namespace Shentun.Peis.Migrations
.HasColumnType("uuid")
.HasColumnName("last_modifier_id");
b.Property<Guid>("ParentId")
b.Property<Guid?>("ParentId")
.HasColumnType("uuid")
.HasColumnName("parent_id")
.IsFixedLength()
.HasComment("父编号");
b.Property<string>("PathCode")
@ -8640,6 +8639,8 @@ namespace Shentun.Peis.Migrations
b.HasIndex(new[] { "CheckRequestNo" }, "ix_register_check_1");
b.HasIndex(new[] { "PatientRegisterId" }, "ix_register_check_patient_register_id");
b.ToTable("register_check");
b.HasComment("登记检查单");
@ -8750,6 +8751,8 @@ namespace Shentun.Peis.Migrations
b.HasIndex(new[] { "PatientRegisterId", "AsbitemId" }, "ix_register_asbitem")
.IsUnique();
b.HasIndex(new[] { "ChargeRequestId" }, "ix_register_check_charge_request_id");
b.ToTable("register_check_asbitem");
b.HasComment("检查组合项目记录");

Loading…
Cancel
Save