using Microsoft.EntityFrameworkCore.Migrations; using MySql.EntityFrameworkCore.Metadata; #nullable disable namespace EmployeeManagementApp.Migrations { /// public partial class InitialCreate : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterDatabase() .Annotation("MySQL:Charset", "utf8mb4"); migrationBuilder.CreateTable( name: "Employees", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), FirstName = table.Column(type: "longtext", nullable: false), LastName = table.Column(type: "longtext", nullable: false), Position = table.Column(type: "longtext", nullable: false), Salary = table.Column(type: "decimal(18,2)", nullable: false), VacationDays = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Employees", x => x.Id); }) .Annotation("MySQL:Charset", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Employees"); } } }