3 changed files with 15116 additions and 16 deletions
-
15032src/Shentun.Peis.EntityFrameworkCore/Migrations/20240715032409_jiaohao20240715.Designer.cs
-
76src/Shentun.Peis.EntityFrameworkCore/Migrations/20240715032409_jiaohao20240715.cs
-
24src/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
File diff suppressed because it is too large
View File
@ -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); |
|||
} |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue