เพิ่มวุฒิในกรรมการวินัย

This commit is contained in:
Kittapath 2024-01-17 11:43:20 +07:00
parent f60beb9f36
commit 4bc76d3211
6 changed files with 3116 additions and 9 deletions

View file

@ -0,0 +1,94 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
/// <inheritdoc />
public partial class updatetableDisciplineDirectorsaddqualification : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Phone",
table: "DisciplineDirectors",
type: "longtext",
nullable: true,
comment: "เบอร์โทรศัพท์",
oldClrType: typeof(string),
oldType: "longtext",
oldComment: "เบอร์โทรศัพท์")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<string>(
name: "Email",
table: "DisciplineDirectors",
type: "longtext",
nullable: true,
comment: "อีเมล",
oldClrType: typeof(string),
oldType: "longtext",
oldComment: "อีเมล")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Qualification",
table: "DisciplineDirectors",
type: "longtext",
nullable: true,
comment: "คุณวุฒิ")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Qualification",
table: "DisciplineDirectors");
migrationBuilder.UpdateData(
table: "DisciplineDirectors",
keyColumn: "Phone",
keyValue: null,
column: "Phone",
value: "");
migrationBuilder.AlterColumn<string>(
name: "Phone",
table: "DisciplineDirectors",
type: "longtext",
nullable: false,
comment: "เบอร์โทรศัพท์",
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true,
oldComment: "เบอร์โทรศัพท์")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.UpdateData(
table: "DisciplineDirectors",
keyColumn: "Email",
keyValue: null,
column: "Email",
value: "");
migrationBuilder.AlterColumn<string>(
name: "Email",
table: "DisciplineDirectors",
type: "longtext",
nullable: false,
comment: "อีเมล",
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true,
oldComment: "อีเมล")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}

View file

@ -607,7 +607,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("longtext")
.HasComment("อีเมล");
@ -641,7 +640,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Phone")
.IsRequired()
.HasColumnType("longtext")
.HasComment("เบอร์โทรศัพท์");
@ -655,6 +653,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("คำนำหน้าชื่อ");
b.Property<string>("Qualification")
.HasColumnType("longtext")
.HasComment("คุณวุฒิ");
b.HasKey("Id");
b.ToTable("DisciplineDirectors");