hrms-api-backend/BMA.EHR.Infrastructure/Migrations/LeaveDb/20231113082133_ update field user timestamps (add) .cs
Suphonchai Phoonsawat 8bf646230a Check in and Check Out
2023-11-13 15:26:14 +07:00

270 lines
11 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
{
/// <inheritdoc />
public partial class updatefieldusertimestampsadd : Migration
{
/// <inheritdoc />
protected override void Up(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");
migrationBuilder.AddColumn<string>(
name: "CheckInImageUrl",
table: "UserTimeStamps",
type: "longtext",
nullable: false,
comment: "รูปถ่ายสถานที่ Check-In")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<double>(
name: "CheckInLat",
table: "UserTimeStamps",
type: "double",
nullable: false,
defaultValue: 0.0,
comment: "พิกัดละติจูด Check-In");
migrationBuilder.AddColumn<string>(
name: "CheckInLocationName",
table: "UserTimeStamps",
type: "longtext",
nullable: true,
comment: "กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<double>(
name: "CheckInLon",
table: "UserTimeStamps",
type: "double",
nullable: false,
defaultValue: 0.0,
comment: "พิกัดลองจิจูด Check-In");
migrationBuilder.AddColumn<string>(
name: "CheckInPOI",
table: "UserTimeStamps",
type: "longtext",
nullable: false,
comment: "ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "CheckInRemark",
table: "UserTimeStamps",
type: "longtext",
nullable: true,
comment: "ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "CheckOutImageUrl",
table: "UserTimeStamps",
type: "longtext",
nullable: false,
comment: "รูปถ่ายสถานที่ Check-Out")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<double>(
name: "CheckOutLat",
table: "UserTimeStamps",
type: "double",
nullable: false,
defaultValue: 0.0,
comment: "พิกัดละติจูด Check-Out");
migrationBuilder.AddColumn<string>(
name: "CheckOutLocationName",
table: "UserTimeStamps",
type: "longtext",
nullable: true,
comment: "กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<double>(
name: "CheckOutLon",
table: "UserTimeStamps",
type: "double",
nullable: false,
defaultValue: 0.0,
comment: "พิกัดลองจิจูด Check-Out");
migrationBuilder.AddColumn<string>(
name: "CheckOutPOI",
table: "UserTimeStamps",
type: "longtext",
nullable: false,
comment: "ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "CheckOutRemark",
table: "UserTimeStamps",
type: "longtext",
nullable: true,
comment: "ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<bool>(
name: "IsLocationCheckIn",
table: "UserTimeStamps",
type: "tinyint(1)",
nullable: false,
defaultValue: false,
comment: "true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In");
migrationBuilder.AddColumn<bool>(
name: "IsLocationCheckOut",
table: "UserTimeStamps",
type: "tinyint(1)",
nullable: false,
defaultValue: false,
comment: "true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CheckInImageUrl",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "CheckInLat",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "CheckInLocationName",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "CheckInLon",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "CheckInPOI",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "CheckInRemark",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "CheckOutImageUrl",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "CheckOutLat",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "CheckOutLocationName",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "CheckOutLon",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "CheckOutPOI",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "CheckOutRemark",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "IsLocationCheckIn",
table: "UserTimeStamps");
migrationBuilder.DropColumn(
name: "IsLocationCheckOut",
table: "UserTimeStamps");
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");
}
}
}