140 lines
5.1 KiB
C#
140 lines
5.1 KiB
C#
|
|
using System;
|
|||
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|
|||
|
|
#nullable disable
|
|||
|
|
|
|||
|
|
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
|||
|
|
{
|
|||
|
|
/// <inheritdoc />
|
|||
|
|
public partial class changecouplehistorydatetonullable : Migration
|
|||
|
|
{
|
|||
|
|
/// <inheritdoc />
|
|||
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
|
{
|
|||
|
|
migrationBuilder.AlterColumn<string>(
|
|||
|
|
name: "CoupleDayTotalHistory",
|
|||
|
|
table: "LeaveRequests",
|
|||
|
|
type: "longtext",
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(string),
|
|||
|
|
oldType: "longtext")
|
|||
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|||
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<string>(
|
|||
|
|
name: "CoupleDaySumTotalHistory",
|
|||
|
|
table: "LeaveRequests",
|
|||
|
|
type: "longtext",
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(string),
|
|||
|
|
oldType: "longtext")
|
|||
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|||
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|||
|
|
name: "CoupleDayStartDateHistory",
|
|||
|
|
table: "LeaveRequests",
|
|||
|
|
type: "datetime(6)",
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(DateTime),
|
|||
|
|
oldType: "datetime(6)");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|||
|
|
name: "CoupleDayEndDateHistory",
|
|||
|
|
table: "LeaveRequests",
|
|||
|
|
type: "datetime(6)",
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(DateTime),
|
|||
|
|
oldType: "datetime(6)");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<string>(
|
|||
|
|
name: "CoupleDayCountryHistory",
|
|||
|
|
table: "LeaveRequests",
|
|||
|
|
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: "LeaveRequests",
|
|||
|
|
keyColumn: "CoupleDayTotalHistory",
|
|||
|
|
keyValue: null,
|
|||
|
|
column: "CoupleDayTotalHistory",
|
|||
|
|
value: "");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<string>(
|
|||
|
|
name: "CoupleDayTotalHistory",
|
|||
|
|
table: "LeaveRequests",
|
|||
|
|
type: "longtext",
|
|||
|
|
nullable: false,
|
|||
|
|
oldClrType: typeof(string),
|
|||
|
|
oldType: "longtext",
|
|||
|
|
oldNullable: true)
|
|||
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|||
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|||
|
|
|
|||
|
|
migrationBuilder.UpdateData(
|
|||
|
|
table: "LeaveRequests",
|
|||
|
|
keyColumn: "CoupleDaySumTotalHistory",
|
|||
|
|
keyValue: null,
|
|||
|
|
column: "CoupleDaySumTotalHistory",
|
|||
|
|
value: "");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<string>(
|
|||
|
|
name: "CoupleDaySumTotalHistory",
|
|||
|
|
table: "LeaveRequests",
|
|||
|
|
type: "longtext",
|
|||
|
|
nullable: false,
|
|||
|
|
oldClrType: typeof(string),
|
|||
|
|
oldType: "longtext",
|
|||
|
|
oldNullable: true)
|
|||
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|||
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|||
|
|
name: "CoupleDayStartDateHistory",
|
|||
|
|
table: "LeaveRequests",
|
|||
|
|
type: "datetime(6)",
|
|||
|
|
nullable: false,
|
|||
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|||
|
|
oldClrType: typeof(DateTime),
|
|||
|
|
oldType: "datetime(6)",
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|||
|
|
name: "CoupleDayEndDateHistory",
|
|||
|
|
table: "LeaveRequests",
|
|||
|
|
type: "datetime(6)",
|
|||
|
|
nullable: false,
|
|||
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|||
|
|
oldClrType: typeof(DateTime),
|
|||
|
|
oldType: "datetime(6)",
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.UpdateData(
|
|||
|
|
table: "LeaveRequests",
|
|||
|
|
keyColumn: "CoupleDayCountryHistory",
|
|||
|
|
keyValue: null,
|
|||
|
|
column: "CoupleDayCountryHistory",
|
|||
|
|
value: "");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<string>(
|
|||
|
|
name: "CoupleDayCountryHistory",
|
|||
|
|
table: "LeaveRequests",
|
|||
|
|
type: "longtext",
|
|||
|
|
nullable: false,
|
|||
|
|
oldClrType: typeof(string),
|
|||
|
|
oldType: "longtext",
|
|||
|
|
oldNullable: true)
|
|||
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|||
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|