3 changed files with 16415 additions and 63 deletions
-
15290src/Shentun.Peis.EntityFrameworkCore/Migrations/20240726100556_critical_value_update.Designer.cs
-
841src/Shentun.Peis.EntityFrameworkCore/Migrations/20240726100556_critical_value_update.cs
-
347src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
15290
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240726100556_critical_value_update.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,841 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Shentun.Peis.Migrations |
|||
{ |
|||
public partial class critical_value_update : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "critical_value"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "phone_follow"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "critical_value_type"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "follow_up_plan_id", |
|||
table: "sms_send"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_create_date", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_process_content", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_process_date", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_process_doctor", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_process_flag", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "critical_value_flag", |
|||
table: "register_check", |
|||
newName: "is_critical_value"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "id", |
|||
table: "sms_type", |
|||
type: "character(2)", |
|||
fixedLength: true, |
|||
maxLength: 2, |
|||
nullable: false, |
|||
comment: "主键Id", |
|||
oldClrType: typeof(Guid), |
|||
oldType: "uuid", |
|||
oldFixedLength: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "sms_type_id", |
|||
table: "sms_send", |
|||
type: "character(2)", |
|||
fixedLength: true, |
|||
maxLength: 2, |
|||
nullable: false, |
|||
comment: "短信类别ID", |
|||
oldClrType: typeof(Guid), |
|||
oldType: "uuid", |
|||
oldFixedLength: true, |
|||
oldComment: "短信类别ID"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "patient_name", |
|||
table: "sms_send", |
|||
type: "character varying(30)", |
|||
maxLength: 30, |
|||
nullable: false, |
|||
comment: "姓名", |
|||
oldClrType: typeof(string), |
|||
oldType: "character varying(16)", |
|||
oldMaxLength: 16, |
|||
oldComment: "姓名"); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "follow_up_id", |
|||
table: "sms_send", |
|||
type: "uuid", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "critical_value_content", |
|||
table: "register_check_item", |
|||
type: "character varying(300)", |
|||
maxLength: 300, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "critical_value_creation_time", |
|||
table: "register_check_item", |
|||
type: "timestamp without time zone", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "critical_value_creator_id", |
|||
table: "register_check_item", |
|||
type: "uuid", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "critical_value_phone_creator_id", |
|||
table: "register_check_item", |
|||
type: "uuid", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "critical_value_sms_creator_id", |
|||
table: "register_check_item", |
|||
type: "uuid", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "follow_up_creation_time", |
|||
table: "register_check_item", |
|||
type: "timestamp without time zone", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "follow_up_creator_id", |
|||
table: "register_check_item", |
|||
type: "uuid", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "follow_up_flag", |
|||
table: "register_check_item", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_critical_value", |
|||
table: "register_check_item", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_critical_value_audit", |
|||
table: "register_check_item", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_critical_value_phone_complete", |
|||
table: "register_check_item", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_critical_value_sms_complete", |
|||
table: "register_check_item", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_review", |
|||
table: "register_check_item", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "critical_value", |
|||
table: "register_check", |
|||
type: "character varying(300)", |
|||
maxLength: 300, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "character varying(100)", |
|||
oldMaxLength: 100, |
|||
oldNullable: true, |
|||
oldComment: "危急值"); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "critical_range_value", |
|||
table: "register_check", |
|||
type: "character varying(300)", |
|||
maxLength: 300, |
|||
nullable: true, |
|||
comment: "危急值"); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "critical_value_content", |
|||
table: "register_check", |
|||
type: "character varying(300)", |
|||
maxLength: 300, |
|||
nullable: true, |
|||
comment: "危急值处理内容"); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "critical_value_creation_time", |
|||
table: "register_check", |
|||
type: "timestamp without time zone", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "critical_value_creator_id", |
|||
table: "register_check", |
|||
type: "uuid", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "critical_value_phone_creator_id", |
|||
table: "register_check", |
|||
type: "uuid", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "critical_value_sms_creator_id", |
|||
table: "register_check", |
|||
type: "uuid", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "follow_up_creation_time", |
|||
table: "register_check", |
|||
type: "timestamp without time zone", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "follow_up_creator_id", |
|||
table: "register_check", |
|||
type: "uuid", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "follow_up_flag", |
|||
table: "register_check", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_critical_value_audit", |
|||
table: "register_check", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_critical_value_phone_complete", |
|||
table: "register_check", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_critical_value_sms_complete", |
|||
table: "register_check", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_review", |
|||
table: "register_check", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "critical_range_value", |
|||
table: "reference_range", |
|||
type: "character varying(150)", |
|||
maxLength: 150, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "character varying(50)", |
|||
oldMaxLength: 50, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "follow_up_range_value", |
|||
table: "reference_range", |
|||
type: "character varying(150)", |
|||
maxLength: 150, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "critical_value_function", |
|||
table: "item", |
|||
type: "text", |
|||
nullable: true, |
|||
comment: "危急值函数"); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "follow_up_function", |
|||
table: "item", |
|||
type: "text", |
|||
nullable: true, |
|||
comment: "随访函数"); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_critical_value_function", |
|||
table: "item", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: false, |
|||
defaultValueSql: "'N'", |
|||
comment: "是否启用危急值函数"); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_follow_up_function", |
|||
table: "item", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: false, |
|||
defaultValueSql: "'N'", |
|||
comment: "是否启用随访函数"); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "critical_value_function", |
|||
table: "asbitem", |
|||
type: "text", |
|||
nullable: true, |
|||
comment: "危急值函数"); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "follow_up_function", |
|||
table: "asbitem", |
|||
type: "text", |
|||
nullable: true, |
|||
comment: "随访函数"); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_critical_value_function", |
|||
table: "asbitem", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: false, |
|||
defaultValueSql: "'N'", |
|||
comment: "是否启用危急值函数"); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_follow_up_function", |
|||
table: "asbitem", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: false, |
|||
defaultValueSql: "'N'", |
|||
comment: "是否启用随访函数"); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "critical_follow_value_type", |
|||
columns: table => new |
|||
{ |
|||
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false), |
|||
display_name = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false, comment: "名称"), |
|||
parent_id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "父编号"), |
|||
path_code = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "路径编码"), |
|||
display_order = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "999999"), |
|||
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
creator_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_critical_follow_value_type", x => x.id); |
|||
}, |
|||
comment: "危急值类别"); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "follow_up", |
|||
columns: table => new |
|||
{ |
|||
id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
patient_register_id = table.Column<Guid>(type: "uuid", nullable: false, comment: "人员登记ID"), |
|||
is_sms_complete = table.Column<char>(type: "character(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "是否短信随访创建完成"), |
|||
is_phone_complete = table.Column<char>(type: "character(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "是否电话随访创建完成"), |
|||
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
creator_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_follow_up", x => x.id); |
|||
}, |
|||
comment: "随访表"); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "phone_follow_up", |
|||
columns: table => new |
|||
{ |
|||
id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
patient_register_id = table.Column<Guid>(type: "uuid", nullable: false, comment: "病人登记ID"), |
|||
follow_up_content = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true, comment: "随访内容"), |
|||
reply_content = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true, comment: "回复内容"), |
|||
follow_up_id = table.Column<Guid>(type: "uuid", nullable: true), |
|||
is_complete = table.Column<char>(type: "character(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "是否完成"), |
|||
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
creator_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_phone_follow_up", x => x.id); |
|||
table.ForeignKey( |
|||
name: "fk_phone_f", |
|||
column: x => x.patient_register_id, |
|||
principalTable: "patient_register", |
|||
principalColumn: "id"); |
|||
}, |
|||
comment: "电话随访"); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "critical_follow_value", |
|||
columns: table => new |
|||
{ |
|||
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false), |
|||
display_name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false, comment: "名称"), |
|||
critical_value_type_id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "危急值类别编号"), |
|||
critical_follow_value_flag = table.Column<char>(type: "character(1)", nullable: false, comment: "危急随访值标志"), |
|||
display_order = table.Column<int>(type: "integer", nullable: false), |
|||
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
creator_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_critical_follow_value", x => x.id); |
|||
table.ForeignKey( |
|||
name: "fk_critica", |
|||
column: x => x.critical_value_type_id, |
|||
principalTable: "critical_follow_value_type", |
|||
principalColumn: "id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}, |
|||
comment: "危急值关键字设置"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "ix_critical_follow_value", |
|||
table: "critical_follow_value", |
|||
column: "display_name", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_critical_follow_value_critical_value_type_id", |
|||
table: "critical_follow_value", |
|||
column: "critical_value_type_id"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "ix_critical_follow_value_type", |
|||
table: "critical_follow_value_type", |
|||
column: "display_name", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_phone_follow_up_patient_register_id", |
|||
table: "phone_follow_up", |
|||
column: "patient_register_id"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "critical_follow_value"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "follow_up"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "phone_follow_up"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "critical_follow_value_type"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "follow_up_id", |
|||
table: "sms_send"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_content", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_creation_time", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_creator_id", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_phone_creator_id", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_sms_creator_id", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "follow_up_creation_time", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "follow_up_creator_id", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "follow_up_flag", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_critical_value", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_critical_value_audit", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_critical_value_phone_complete", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_critical_value_sms_complete", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_review", |
|||
table: "register_check_item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_range_value", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_content", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_creation_time", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_creator_id", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_phone_creator_id", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_sms_creator_id", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "follow_up_creation_time", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "follow_up_creator_id", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "follow_up_flag", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_critical_value_audit", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_critical_value_phone_complete", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_critical_value_sms_complete", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_review", |
|||
table: "register_check"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "follow_up_range_value", |
|||
table: "reference_range"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_function", |
|||
table: "item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "follow_up_function", |
|||
table: "item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_critical_value_function", |
|||
table: "item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_follow_up_function", |
|||
table: "item"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "critical_value_function", |
|||
table: "asbitem"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "follow_up_function", |
|||
table: "asbitem"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_critical_value_function", |
|||
table: "asbitem"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "is_follow_up_function", |
|||
table: "asbitem"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "is_critical_value", |
|||
table: "register_check", |
|||
newName: "critical_value_flag"); |
|||
|
|||
migrationBuilder.AlterColumn<Guid>( |
|||
name: "id", |
|||
table: "sms_type", |
|||
type: "uuid", |
|||
fixedLength: true, |
|||
nullable: false, |
|||
oldClrType: typeof(string), |
|||
oldType: "character(2)", |
|||
oldFixedLength: true, |
|||
oldMaxLength: 2, |
|||
oldComment: "主键Id"); |
|||
|
|||
migrationBuilder.AlterColumn<Guid>( |
|||
name: "sms_type_id", |
|||
table: "sms_send", |
|||
type: "uuid", |
|||
fixedLength: true, |
|||
nullable: false, |
|||
comment: "短信类别ID", |
|||
oldClrType: typeof(string), |
|||
oldType: "character(2)", |
|||
oldFixedLength: true, |
|||
oldMaxLength: 2, |
|||
oldComment: "短信类别ID"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "patient_name", |
|||
table: "sms_send", |
|||
type: "character varying(16)", |
|||
maxLength: 16, |
|||
nullable: false, |
|||
comment: "姓名", |
|||
oldClrType: typeof(string), |
|||
oldType: "character varying(30)", |
|||
oldMaxLength: 30, |
|||
oldComment: "姓名"); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "follow_up_plan_id", |
|||
table: "sms_send", |
|||
type: "uuid", |
|||
nullable: true, |
|||
comment: "随访计划ID"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "critical_value", |
|||
table: "register_check", |
|||
type: "character varying(100)", |
|||
maxLength: 100, |
|||
nullable: true, |
|||
comment: "危急值", |
|||
oldClrType: typeof(string), |
|||
oldType: "character varying(300)", |
|||
oldMaxLength: 300, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "critical_value_create_date", |
|||
table: "register_check", |
|||
type: "timestamp without time zone", |
|||
nullable: true, |
|||
comment: "危急值创建日期"); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "critical_value_process_content", |
|||
table: "register_check", |
|||
type: "character varying(100)", |
|||
maxLength: 100, |
|||
nullable: true, |
|||
comment: "危急值处理内容"); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "critical_value_process_date", |
|||
table: "register_check", |
|||
type: "timestamp without time zone", |
|||
nullable: true, |
|||
comment: "危急值处理日期"); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "critical_value_process_doctor", |
|||
table: "register_check", |
|||
type: "character varying(16)", |
|||
maxLength: 16, |
|||
nullable: true, |
|||
comment: "危急值处理医生"); |
|||
|
|||
migrationBuilder.AddColumn<char>( |
|||
name: "critical_value_process_flag", |
|||
table: "register_check", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: true, |
|||
comment: "危急值处理标志"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "critical_range_value", |
|||
table: "reference_range", |
|||
type: "character varying(50)", |
|||
maxLength: 50, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "character varying(150)", |
|||
oldMaxLength: 150, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "critical_value_type", |
|||
columns: table => new |
|||
{ |
|||
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false), |
|||
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
creator_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
display_name = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false, comment: "名称"), |
|||
display_order = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "999999"), |
|||
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
parent_id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "父编号"), |
|||
path_code = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "路径编码") |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_critical_value_type", x => x.id); |
|||
}, |
|||
comment: "危急值类别"); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "phone_follow", |
|||
columns: table => new |
|||
{ |
|||
id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
patient_register_id = table.Column<Guid>(type: "uuid", nullable: false, comment: "病人登记ID"), |
|||
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
creator_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
follow_content = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true, comment: "随访内容"), |
|||
follow_up_plan_id = table.Column<Guid>(type: "uuid", nullable: true, comment: "随访计划ID"), |
|||
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
reply_content = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true, comment: "回复内容") |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_phone_follow", x => x.id); |
|||
table.ForeignKey( |
|||
name: "fk_phone_f", |
|||
column: x => x.patient_register_id, |
|||
principalTable: "patient_register", |
|||
principalColumn: "id"); |
|||
}, |
|||
comment: "电话随访"); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "critical_value", |
|||
columns: table => new |
|||
{ |
|||
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false), |
|||
critical_value_type_id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "危急值类别编号"), |
|||
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
creator_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
display_name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false, comment: "名称"), |
|||
display_order = table.Column<int>(type: "integer", nullable: false), |
|||
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_critical_value", x => x.id); |
|||
table.ForeignKey( |
|||
name: "fk_critica", |
|||
column: x => x.critical_value_type_id, |
|||
principalTable: "critical_value_type", |
|||
principalColumn: "id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}, |
|||
comment: "危急值关键字设置"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "ix_critical_value", |
|||
table: "critical_value", |
|||
column: "display_name", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_critical_value_critical_value_type_id", |
|||
table: "critical_value", |
|||
column: "critical_value_type_id"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "ix_critical_value_type", |
|||
table: "critical_value_type", |
|||
column: "display_name", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_phone_follow_patient_register_id", |
|||
table: "phone_follow", |
|||
column: "patient_register_id"); |
|||
} |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue