hrms-api-backend/BMA.EHR.Infrastructure/Migrations/20230818092030_update table placementofficer add datestart.cs
2023-08-19 21:03:17 +07:00

40 lines
1.1 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetableplacementofficeradddatestart : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Date",
table: "PlacementOfficers",
newName: "DateStart");
migrationBuilder.AddColumn<DateTime>(
name: "DateEnd",
table: "PlacementOfficers",
type: "datetime(6)",
nullable: true,
comment: "ถึงวันที่");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DateEnd",
table: "PlacementOfficers");
migrationBuilder.RenameColumn(
name: "DateStart",
table: "PlacementOfficers",
newName: "Date");
}
}
}