hrms-api-backend/BMA.EHR.Infrastructure/Migrations/LeaveDb/20231110064104_ update field user timestamps .cs

102 lines
3.8 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
{
/// <inheritdoc />
public partial class updatefieldusertimestamps : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "ImageUrl",
table: "UserTimeStamps",
type: "longtext",
nullable: false,
comment: "รูปถ่ายสถานที่ checkin/checkout")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<bool>(
name: "IsLocation",
table: "UserTimeStamps",
type: "tinyint(1)",
nullable: false,
defaultValue: false,
comment: "true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง");
migrationBuilder.AddColumn<double>(
name: "Lat",
table: "UserTimeStamps",
type: "double",
nullable: false,
defaultValue: 0.0,
comment: "พิกัดละติจูด");
migrationBuilder.AddColumn<string>(
name: "LocationName",
table: "UserTimeStamps",
type: "longtext",
nullable: true,
comment: "กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<double>(
name: "Lon",
table: "UserTimeStamps",
type: "double",
nullable: false,
defaultValue: 0.0,
comment: "พิกัดลองจิจูด");
migrationBuilder.AddColumn<string>(
name: "POI",
table: "UserTimeStamps",
type: "longtext",
nullable: false,
comment: "ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Remark",
table: "UserTimeStamps",
type: "longtext",
nullable: true,
comment: "ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้)")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ImageUrl",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "IsLocation",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "Lat",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "LocationName",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "Lon",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "POI",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "Remark",
table: "UserTimeStamps");
}
}
}