using Data.SeaHavenIndustries; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Data.SeaHavenIndustries.Migrations { /// [DbContext(typeof(ApplicationDbContext))] [Migration("20260730150000_WoIsAddOn")] public partial class WoIsAddOn : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "IsAddOn", table: "workOrders", type: "bit", nullable: false, defaultValue: false); // Legacy WorkOrderType.AddOn (7) → flag; do not remap type (real type unknown). migrationBuilder.Sql( "UPDATE workOrders SET IsAddOn = 1 WHERE WorkOrderType = 7;"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "IsAddOn", table: "workOrders"); } } }