4 changed files with 13997 additions and 49 deletions
-
38src/Shentun.Peis.Application/PeisReports/PeisReportAppService.cs
-
13785src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420092428_init20240420003.Designer.cs
-
158src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420092428_init20240420003.cs
-
51src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
13785
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420092428_init20240420003.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,158 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Shentun.Peis.Migrations |
||||
|
{ |
||||
|
public partial class init20240420003 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropForeignKey( |
||||
|
name: "fk_lis_request_sample_group", |
||||
|
table: "lis_request"); |
||||
|
|
||||
|
migrationBuilder.DropForeignKey( |
||||
|
name: "fk_sample_", |
||||
|
table: "sample_group"); |
||||
|
|
||||
|
migrationBuilder.DropIndex( |
||||
|
name: "IX_lis_request_sample_group_id", |
||||
|
table: "lis_request"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "sample_group_id", |
||||
|
table: "lis_request"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "sampler", |
||||
|
table: "lis_request"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<Guid>( |
||||
|
name: "sample_container_id", |
||||
|
table: "lis_request", |
||||
|
type: "uuid", |
||||
|
nullable: false, |
||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), |
||||
|
comment: "标本容器编号"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<Guid>( |
||||
|
name: "sample_type_id", |
||||
|
table: "lis_request", |
||||
|
type: "uuid", |
||||
|
nullable: false, |
||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), |
||||
|
comment: "标本类型"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<Guid>( |
||||
|
name: "sampler_id", |
||||
|
table: "lis_request", |
||||
|
type: "uuid", |
||||
|
nullable: true, |
||||
|
comment: "采样人ID"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_lis_request_sample_container_id", |
||||
|
table: "lis_request", |
||||
|
column: "sample_container_id"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_lis_request_sample_type_id", |
||||
|
table: "lis_request", |
||||
|
column: "sample_type_id"); |
||||
|
|
||||
|
migrationBuilder.AddForeignKey( |
||||
|
name: "fk_lis_request_sample_container", |
||||
|
table: "lis_request", |
||||
|
column: "sample_container_id", |
||||
|
principalTable: "sample_container", |
||||
|
principalColumn: "id"); |
||||
|
|
||||
|
migrationBuilder.AddForeignKey( |
||||
|
name: "fk_lis_request_sample_type", |
||||
|
table: "lis_request", |
||||
|
column: "sample_type_id", |
||||
|
principalTable: "sample_type", |
||||
|
principalColumn: "id"); |
||||
|
|
||||
|
migrationBuilder.AddForeignKey( |
||||
|
name: "fk_sample_group_sample_container", |
||||
|
table: "sample_group", |
||||
|
column: "sample_container_id", |
||||
|
principalTable: "sample_container", |
||||
|
principalColumn: "id"); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropForeignKey( |
||||
|
name: "fk_lis_request_sample_container", |
||||
|
table: "lis_request"); |
||||
|
|
||||
|
migrationBuilder.DropForeignKey( |
||||
|
name: "fk_lis_request_sample_type", |
||||
|
table: "lis_request"); |
||||
|
|
||||
|
migrationBuilder.DropForeignKey( |
||||
|
name: "fk_sample_group_sample_container", |
||||
|
table: "sample_group"); |
||||
|
|
||||
|
migrationBuilder.DropIndex( |
||||
|
name: "IX_lis_request_sample_container_id", |
||||
|
table: "lis_request"); |
||||
|
|
||||
|
migrationBuilder.DropIndex( |
||||
|
name: "IX_lis_request_sample_type_id", |
||||
|
table: "lis_request"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "sample_container_id", |
||||
|
table: "lis_request"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "sample_type_id", |
||||
|
table: "lis_request"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "sampler_id", |
||||
|
table: "lis_request"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<Guid>( |
||||
|
name: "sample_group_id", |
||||
|
table: "lis_request", |
||||
|
type: "uuid", |
||||
|
fixedLength: true, |
||||
|
nullable: false, |
||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), |
||||
|
comment: "条码分组ID"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "sampler", |
||||
|
table: "lis_request", |
||||
|
type: "character varying(16)", |
||||
|
maxLength: 16, |
||||
|
nullable: true, |
||||
|
comment: "采样人姓名"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_lis_request_sample_group_id", |
||||
|
table: "lis_request", |
||||
|
column: "sample_group_id"); |
||||
|
|
||||
|
migrationBuilder.AddForeignKey( |
||||
|
name: "fk_lis_request_sample_group", |
||||
|
table: "lis_request", |
||||
|
column: "sample_group_id", |
||||
|
principalTable: "sample_group", |
||||
|
principalColumn: "id"); |
||||
|
|
||||
|
migrationBuilder.AddForeignKey( |
||||
|
name: "fk_sample_", |
||||
|
table: "sample_group", |
||||
|
column: "sample_container_id", |
||||
|
principalTable: "sample_container", |
||||
|
principalColumn: "id"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue