no message
This commit is contained in:
parent
519ef2f143
commit
f3e8330241
5 changed files with 19376 additions and 41 deletions
|
|
@ -0,0 +1,131 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableinsigniaaddOrgReceiveInsigniaId : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_Organizations_OrgReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_Organizations_OrgReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InsigniaNoteProfiles_OrgReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InsigniaNoteProfiles_OrgReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "OrgReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
comment: "หน่วยงานคืนเครื่องราชฯ",
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "OrgReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
comment: "หน่วยงานรับเครื่องราชฯ",
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "OrgReceiveInsignia",
|
||||
table: "InsigniaNoteProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "หน่วยงานรับเครื่องราชฯ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "OrgReturnInsignia",
|
||||
table: "InsigniaNoteProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "หน่วยงานคืนเครื่องราชฯ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OrgReceiveInsignia",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OrgReturnInsignia",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "OrgReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true,
|
||||
oldComment: "หน่วยงานคืนเครื่องราชฯ")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "OrgReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true,
|
||||
oldComment: "หน่วยงานรับเครื่องราชฯ")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InsigniaNoteProfiles_OrgReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "OrgReceiveInsigniaId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InsigniaNoteProfiles_OrgReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "OrgReturnInsigniaId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_Organizations_OrgReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "OrgReceiveInsigniaId",
|
||||
principalTable: "Organizations",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_Organizations_OrgReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "OrgReturnInsigniaId",
|
||||
principalTable: "Organizations",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue