using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations.LeaveDb { /// public partial class updatefieldusertimestamps : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { 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"); } /// 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"); } } }