mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-08-11 11:42:03 +00:00
Fix duplicate changedOrderToJob migration blocking build
Two divergent copies of this branch each independently regenerated an EF migration named changedOrderToJob, and merging both left two files with the same C# class name (compile error) plus an orphaned fixedOrderCustomerID migration referencing the already-renamed orders table. Removed the dead/unapplied migrations, committed the two migrations already live on the shared dev DB, and added FixJobsCustomerIdType to bring jobs.customer_id in line with the model (text -> integer) using an explicit USING cast. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -290,6 +290,7 @@ jobGroup.MapPost("", async (Jobs newJobInput, BarkContext db) =>
|
||||
EndDate = newJobInput.EndDate,
|
||||
Venue = newJobInput.Venue,
|
||||
Address = newJobInput.Address,
|
||||
Notes = newJobInput.Notes,
|
||||
};
|
||||
|
||||
db.Jobs.Add(newJob);
|
||||
@@ -370,7 +371,7 @@ jobItemGroup.MapPut("/{id}", async (int id, JobItems updatedJobItems, BarkContex
|
||||
return Results.NotFound(new { Message = "Job Items not found" });
|
||||
}
|
||||
|
||||
existingJobItems.OrderId = updatedJobItems.OrderId;
|
||||
existingJobItems.JobId = updatedJobItems.JobId;
|
||||
existingJobItems.ItemId = updatedJobItems.ItemId;
|
||||
existingJobItems.Quantity = updatedJobItems.Quantity;
|
||||
|
||||
@@ -382,7 +383,7 @@ jobItemGroup.MapPost("", async (JobItems newJobItemsInput, BarkContext db) =>
|
||||
{
|
||||
var newJobItem = new JobItems()
|
||||
{
|
||||
OrderId = newJobItemsInput.OrderId,
|
||||
JobId = newJobItemsInput.JobId,
|
||||
ItemId = newJobItemsInput.ItemId,
|
||||
Quantity = newJobItemsInput.Quantity,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user