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