4 changed files with 15732 additions and 20 deletions
-
13src/Shentun.Peis.EntityFrameworkCore/DbMapping/PhoneFollows/PhoneFollowDbMapping.cs
-
15625src/Shentun.Peis.EntityFrameworkCore/Migrations/20240918095223_update_follow_up.Designer.cs
-
87src/Shentun.Peis.EntityFrameworkCore/Migrations/20240918095223_update_follow_up.cs
-
27src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
15625
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240918095223_update_follow_up.Designer.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,87 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Shentun.Peis.Migrations |
||||
|
{ |
||||
|
public partial class update_follow_up : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropForeignKey( |
||||
|
name: "fk_phone_f", |
||||
|
table: "phone_follow_up"); |
||||
|
|
||||
|
migrationBuilder.DropIndex( |
||||
|
name: "IX_phone_follow_up_patient_register_id", |
||||
|
table: "phone_follow_up"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "patient_register_id", |
||||
|
table: "phone_follow_up"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<Guid>( |
||||
|
name: "follow_up_id", |
||||
|
table: "phone_follow_up", |
||||
|
type: "uuid", |
||||
|
nullable: false, |
||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), |
||||
|
oldClrType: typeof(Guid), |
||||
|
oldType: "uuid", |
||||
|
oldNullable: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_phone_follow_up_follow_up_id", |
||||
|
table: "phone_follow_up", |
||||
|
column: "follow_up_id"); |
||||
|
|
||||
|
migrationBuilder.AddForeignKey( |
||||
|
name: "fk_phone_follow_follow_up", |
||||
|
table: "phone_follow_up", |
||||
|
column: "follow_up_id", |
||||
|
principalTable: "follow_up", |
||||
|
principalColumn: "id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropForeignKey( |
||||
|
name: "fk_phone_follow_follow_up", |
||||
|
table: "phone_follow_up"); |
||||
|
|
||||
|
migrationBuilder.DropIndex( |
||||
|
name: "IX_phone_follow_up_follow_up_id", |
||||
|
table: "phone_follow_up"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<Guid>( |
||||
|
name: "follow_up_id", |
||||
|
table: "phone_follow_up", |
||||
|
type: "uuid", |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(Guid), |
||||
|
oldType: "uuid"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<Guid>( |
||||
|
name: "patient_register_id", |
||||
|
table: "phone_follow_up", |
||||
|
type: "uuid", |
||||
|
nullable: false, |
||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), |
||||
|
comment: "病人登记ID"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_phone_follow_up_patient_register_id", |
||||
|
table: "phone_follow_up", |
||||
|
column: "patient_register_id"); |
||||
|
|
||||
|
migrationBuilder.AddForeignKey( |
||||
|
name: "fk_phone_f", |
||||
|
table: "phone_follow_up", |
||||
|
column: "patient_register_id", |
||||
|
principalTable: "patient_register", |
||||
|
principalColumn: "id"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue