Browse Source

叫号迁移文件

master
wxd 1 year ago
parent
commit
9b837a5bcb
  1. 15032
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240715032409_jiaohao20240715.Designer.cs
  2. 76
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240715032409_jiaohao20240715.cs
  3. 24
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

15032
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240715032409_jiaohao20240715.Designer.cs
File diff suppressed because it is too large
View File

76
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240715032409_jiaohao20240715.cs

@ -0,0 +1,76 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class jiaohao20240715 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "fk_room_department",
table: "room");
migrationBuilder.DropIndex(
name: "IX_room_department_id",
table: "room");
migrationBuilder.DropColumn(
name: "department_id",
table: "room");
migrationBuilder.AddColumn<Guid>(
name: "medical_center_id",
table: "room",
type: "uuid",
fixedLength: true,
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
comment: "体检中心");
migrationBuilder.AddColumn<decimal>(
name: "queue_time",
table: "room",
type: "numeric(3,1)",
precision: 3,
scale: 1,
nullable: false,
defaultValue: 0m);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "medical_center_id",
table: "room");
migrationBuilder.DropColumn(
name: "queue_time",
table: "room");
migrationBuilder.AddColumn<Guid>(
name: "department_id",
table: "room",
type: "uuid",
fixedLength: true,
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
comment: "");
migrationBuilder.CreateIndex(
name: "IX_room_department_id",
table: "room",
column: "department_id");
migrationBuilder.AddForeignKey(
name: "fk_room_department",
table: "room",
column: "department_id",
principalTable: "department",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
}
}
}

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

@ -9286,11 +9286,16 @@ namespace Shentun.Peis.Migrations
.HasColumnType("uuid")
.HasColumnName("last_modifier_id");
b.Property<Guid>("OrganizationUnitId")
b.Property<Guid>("MedicalCenterId")
.HasColumnType("uuid")
.HasColumnName("department_id")
.HasColumnName("medical_center_id")
.IsFixedLength()
.HasComment("");
.HasComment("体检中心");
b.Property<decimal>("QueueTime")
.HasPrecision(3, 1)
.HasColumnType("numeric(3,1)")
.HasColumnName("queue_time");
b.Property<char>("RoomTypeFlag")
.ValueGeneratedOnAdd()
@ -9308,8 +9313,6 @@ namespace Shentun.Peis.Migrations
b.HasIndex("ItemTypeId");
b.HasIndex("OrganizationUnitId");
b.HasIndex(new[] { "DisplayName" }, "ix_room")
.IsUnique();
@ -14173,15 +14176,6 @@ namespace Shentun.Peis.Migrations
.IsRequired()
.HasConstraintName("fk_room_item_type");
b.HasOne("Shentun.Peis.Models.Department", "Department")
.WithMany("Rooms")
.HasForeignKey("OrganizationUnitId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_room_department");
b.Navigation("Department");
b.Navigation("ItemType");
});
@ -14736,8 +14730,6 @@ namespace Shentun.Peis.Migrations
{
b.Navigation("OrganizationUnitsCustomerOrgs");
b.Navigation("Rooms");
b.Navigation("ServiceTrades");
b.Navigation("UserDepartments");

Loading…
Cancel
Save