hrms-api-backend/BMA.EHR.Infrastructure/Migrations/20240521095836_update table RetirementResigns add child1.cs
2024-05-21 19:41:55 +07:00

74 lines
2.5 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetableRetirementResignsaddchild1 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "KeycloakUserId",
table: "Notifications",
type: "longtext",
nullable: true,
oldClrType: typeof(string),
oldType: "longtext")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<string>(
name: "KeycloakUserId",
table: "Inboxes",
type: "longtext",
nullable: true,
oldClrType: typeof(string),
oldType: "longtext")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "Notifications",
keyColumn: "KeycloakUserId",
keyValue: null,
column: "KeycloakUserId",
value: "");
migrationBuilder.AlterColumn<string>(
name: "KeycloakUserId",
table: "Notifications",
type: "longtext",
nullable: false,
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.UpdateData(
table: "Inboxes",
keyColumn: "KeycloakUserId",
keyValue: null,
column: "KeycloakUserId",
value: "");
migrationBuilder.AlterColumn<string>(
name: "KeycloakUserId",
table: "Inboxes",
type: "longtext",
nullable: false,
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}