Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8768e9813b | |||
| 4a7087cc0c | |||
| 59b152c89f | |||
| 441898b52f | |||
| 3e30397302 | |||
| 31c5746e5b | |||
| 3f9ac27afa | |||
| 8a0a564885 |
@@ -264,6 +264,7 @@ public class QuotePricingAssemblyService : IQuotePricingAssemblyService
|
|||||||
TransferEfficiency = coatDto.TransferEfficiency,
|
TransferEfficiency = coatDto.TransferEfficiency,
|
||||||
PowderCostPerLb = coatDto.PowderCostPerLb,
|
PowderCostPerLb = coatDto.PowderCostPerLb,
|
||||||
PowderToOrder = coatDto.PowderToOrder,
|
PowderToOrder = coatDto.PowderToOrder,
|
||||||
|
NoExtraLayerCharge = coatDto.NoExtraLayerCharge,
|
||||||
Notes = coatDto.Notes,
|
Notes = coatDto.Notes,
|
||||||
CompanyId = companyId,
|
CompanyId = companyId,
|
||||||
CreatedAt = createdAtUtc
|
CreatedAt = createdAtUtc
|
||||||
|
|||||||
+26
-41
@@ -11,47 +11,32 @@ namespace PowderCoating.Infrastructure.Migrations
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.DropForeignKey(
|
// Use IF EXISTS guards for all ShopWorker drops — prod and dev diverged on whether
|
||||||
name: "FK_Jobs_ShopWorkers_ShopWorkerId",
|
// these objects exist, so unconditional drops would fail on whichever DB is missing them.
|
||||||
table: "Jobs");
|
migrationBuilder.Sql(@"
|
||||||
|
IF EXISTS (SELECT 1 FROM sys.foreign_keys WHERE name = 'FK_Jobs_ShopWorkers_ShopWorkerId')
|
||||||
migrationBuilder.DropForeignKey(
|
ALTER TABLE [Jobs] DROP CONSTRAINT [FK_Jobs_ShopWorkers_ShopWorkerId];
|
||||||
name: "FK_JobTimeEntries_ShopWorkers_ShopWorkerId",
|
IF EXISTS (SELECT 1 FROM sys.foreign_keys WHERE name = 'FK_JobTimeEntries_ShopWorkers_ShopWorkerId')
|
||||||
table: "JobTimeEntries");
|
ALTER TABLE [JobTimeEntries] DROP CONSTRAINT [FK_JobTimeEntries_ShopWorkers_ShopWorkerId];
|
||||||
|
IF EXISTS (SELECT 1 FROM sys.foreign_keys WHERE name = 'FK_MaintenanceRecords_ShopWorkers_ShopWorkerId')
|
||||||
migrationBuilder.DropForeignKey(
|
ALTER TABLE [MaintenanceRecords] DROP CONSTRAINT [FK_MaintenanceRecords_ShopWorkers_ShopWorkerId];
|
||||||
name: "FK_MaintenanceRecords_ShopWorkers_ShopWorkerId",
|
IF EXISTS (SELECT 1 FROM sys.tables WHERE name = 'ShopWorkerRoleCosts')
|
||||||
table: "MaintenanceRecords");
|
DROP TABLE [ShopWorkerRoleCosts];
|
||||||
|
IF EXISTS (SELECT 1 FROM sys.tables WHERE name = 'ShopWorkers')
|
||||||
migrationBuilder.DropTable(
|
DROP TABLE [ShopWorkers];
|
||||||
name: "ShopWorkerRoleCosts");
|
IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = 'IX_MaintenanceRecords_ShopWorkerId' AND object_id = OBJECT_ID('MaintenanceRecords'))
|
||||||
|
DROP INDEX [IX_MaintenanceRecords_ShopWorkerId] ON [MaintenanceRecords];
|
||||||
migrationBuilder.DropTable(
|
IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = 'IX_JobTimeEntries_ShopWorkerId' AND object_id = OBJECT_ID('JobTimeEntries'))
|
||||||
name: "ShopWorkers");
|
DROP INDEX [IX_JobTimeEntries_ShopWorkerId] ON [JobTimeEntries];
|
||||||
|
IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = 'IX_Jobs_ShopWorkerId' AND object_id = OBJECT_ID('Jobs'))
|
||||||
migrationBuilder.DropIndex(
|
DROP INDEX [IX_Jobs_ShopWorkerId] ON [Jobs];
|
||||||
name: "IX_MaintenanceRecords_ShopWorkerId",
|
IF EXISTS (SELECT 1 FROM sys.columns WHERE name = 'ShopWorkerId' AND object_id = OBJECT_ID('MaintenanceRecords'))
|
||||||
table: "MaintenanceRecords");
|
ALTER TABLE [MaintenanceRecords] DROP COLUMN [ShopWorkerId];
|
||||||
|
IF EXISTS (SELECT 1 FROM sys.columns WHERE name = 'ShopWorkerId' AND object_id = OBJECT_ID('JobTimeEntries'))
|
||||||
migrationBuilder.DropIndex(
|
ALTER TABLE [JobTimeEntries] DROP COLUMN [ShopWorkerId];
|
||||||
name: "IX_JobTimeEntries_ShopWorkerId",
|
IF EXISTS (SELECT 1 FROM sys.columns WHERE name = 'ShopWorkerId' AND object_id = OBJECT_ID('Jobs'))
|
||||||
table: "JobTimeEntries");
|
ALTER TABLE [Jobs] DROP COLUMN [ShopWorkerId];
|
||||||
|
");
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Jobs_ShopWorkerId",
|
|
||||||
table: "Jobs");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ShopWorkerId",
|
|
||||||
table: "MaintenanceRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ShopWorkerId",
|
|
||||||
table: "JobTimeEntries");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ShopWorkerId",
|
|
||||||
table: "Jobs");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
name: "ReminderSentAt",
|
name: "ReminderSentAt",
|
||||||
|
|||||||
@@ -477,6 +477,7 @@ public class JobsController : Controller
|
|||||||
transferEfficiency = c.TransferEfficiency,
|
transferEfficiency = c.TransferEfficiency,
|
||||||
powderCostPerLb = c.PowderCostPerLb,
|
powderCostPerLb = c.PowderCostPerLb,
|
||||||
powderToOrder = c.PowderToOrder,
|
powderToOrder = c.PowderToOrder,
|
||||||
|
noExtraLayerCharge = c.NoExtraLayerCharge,
|
||||||
notes = c.Notes
|
notes = c.Notes
|
||||||
}),
|
}),
|
||||||
prepServices = ji.PrepServices.Select(ps => new {
|
prepServices = ji.PrepServices.Select(ps => new {
|
||||||
@@ -2946,6 +2947,7 @@ public class JobsController : Controller
|
|||||||
TransferEfficiency = c.TransferEfficiency,
|
TransferEfficiency = c.TransferEfficiency,
|
||||||
PowderCostPerLb = c.PowderCostPerLb,
|
PowderCostPerLb = c.PowderCostPerLb,
|
||||||
PowderToOrder = c.PowderToOrder,
|
PowderToOrder = c.PowderToOrder,
|
||||||
|
NoExtraLayerCharge = c.NoExtraLayerCharge,
|
||||||
Notes = c.Notes
|
Notes = c.Notes
|
||||||
}).ToList(),
|
}).ToList(),
|
||||||
PrepServices = ji.PrepServices.Select(ps => new CreateQuoteItemPrepServiceDto
|
PrepServices = ji.PrepServices.Select(ps => new CreateQuoteItemPrepServiceDto
|
||||||
@@ -3126,7 +3128,8 @@ public class JobsController : Controller
|
|||||||
InventoryItemId = c.InventoryItemId,
|
InventoryItemId = c.InventoryItemId,
|
||||||
CoverageSqFtPerLb = c.CoverageSqFtPerLb,
|
CoverageSqFtPerLb = c.CoverageSqFtPerLb,
|
||||||
TransferEfficiency = c.TransferEfficiency,
|
TransferEfficiency = c.TransferEfficiency,
|
||||||
PowderCostPerLb = c.PowderCostPerLb
|
PowderCostPerLb = c.PowderCostPerLb,
|
||||||
|
NoExtraLayerCharge = c.NoExtraLayerCharge
|
||||||
}).ToList()
|
}).ToList()
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user